Skip to content
Weik.ioDocs
2026.2
Try Weik.io

Custom metrics

Weik.io 2026.2

Count what your integration does with Camel's micrometer: and opentelemetry-metrics: components, and read the counts beside the platform's own figures. Product page · Video

Watch: Custom metrics, 3:03

The video counts processed invoices with a custom metric and finds the number next to the platform's own figures.

On this page

Every Camel process sends its metrics to the hub through the OpenTelemetry SDK, with no Java agent attached: Camel’s counts and timings per route, the JVM’s memory and garbage collection, and the counters you write yourself. You write a counter the way the Camel documentation writes it, and the platform does the rest.

Count something#

Add a step to the route that does the work. Both of Camel’s metric components count:

routes/publish.camel.yaml
- route:
    from:
      uri: direct:publish
      steps:
        - to: "kamelet:weikio-event-sink?channel=invoice-created"
        - to: micrometer:counter:invoices.processed
routes/reject.camel.yaml
- route:
    from:
      uri: direct:reject
      steps:
        - to: opentelemetry-metrics:counter:invoices.rejected
        - log: "Invoice ${header.InvoiceId} rejected"

micrometer:counter:invoices.processed and opentelemetry-metrics:counter:invoices.rejected both count. The components resolve by themselves, so integration.yaml needs no new dependency. Apply and deploy the integration as usual.

Every figure carries the integration, the version, the project, the environment, the agent and the Camel line. The hub writes the project, environment, integration and agent from the credential the process sends with, so code in one integration can’t file numbers under another project.

Read the counts#

weikio metrics prints the integration’s figures over a window, then a table of its own counters with the route that counts each:

Terminal
$ weikio metrics finance/erp-invoice-export --env production --since 24h

The COUNTER table lists each counter by the name the route writes, such as invoices.processed, with its count over the window, its rate per minute now and its route. To draw one counter over time, split by agent or version:

Terminal
$ weikio metrics finance/erp-invoice-export --env production --name invoices.processed --by version --since 7d

-o csv prints the same series for a spreadsheet.

In the admin UI#

The integration’s Overview has a Last hour strip of four numbers: messages, failed, memory and your first counter. Its Metrics page opens on six numbers and two charts, and a fold below them lists every counter of yours with the route that counts it.

/integrations/finance/erp-invoice-export/metrics
The Metrics page of finance/erp-invoice-export in production with six numbers, a chart of messages per minute with deploy markers and a memory chartThe Metrics page of finance/erp-invoice-export in production with six numbers, a chart of messages per minute with deploy markers and a memory chartThe Metrics page of finance/erp-invoice-export in production with six numbers, a chart of messages per minute with deploy markers and a memory chartThe Metrics page of finance/erp-invoice-export in production with six numbers, a chart of messages per minute with deploy markers and a memory chart
Metrics charts the messages and memory of an integration in one environment, with a marker at each deploy, and opens on six numbers that include failed messages and restarts.

A counter whose attributes come from message data, one series per invoice number for example, is cut off at the metric store’s series limit, and weikio-backend doctor warns when that has happened.

Metrics are kept 90 days, and telemetry forwarding sends the same metrics to Azure Monitor, Splunk or any OTLP receiver.