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 figures Weik.io collects. Product page · Video

Watch: Custom metrics, 3:14

The video counts processed invoices with a custom metric and finds the number beside the integration's other figures.

On this page

Weik.io collects the metrics of every Camel process. They include Camel’s counts and timings per route and the JVM’s memory and garbage collection. To count something of your own, add a counter to a route the way the Camel documentation shows.

Count something#

Add a micrometer: or opentelemetry-metrics: counter step to the route that does the work:

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"

Neither component needs an entry in integration.yaml. Apply and deploy the integration as usual.

Each figure has labels that say where it comes from:

  • The project
  • The environment
  • The integration
  • The version
  • The agent
  • The Camel line

Weik.io sets every label except the version and the Camel line. An integration’s code can’t file its figures under another project.

Read the counts#

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

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

For each counter, such as invoices.processed, the COUNTER table shows its count over the window and its rate per minute now. To follow one counter over time, give its name with --name and split it by agent or version with --by:

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#

Your first counter appears in the Last hour row of the integration’s Overview. On the integration’s Metrics page, a collapsed section below the charts lists your counters and the route that counts each.

/integrations/finance/erp-invoice-export/metrics
The Metrics page of finance/erp-invoice-export in production with six numbers and a memory chart. Its chart of messages per minute has deploy markers.The Metrics page of finance/erp-invoice-export in production with six numbers and a memory chart. Its chart of messages per minute has deploy markers.The Metrics page of finance/erp-invoice-export in production with six numbers and a memory chart. Its chart of messages per minute has deploy markers.The Metrics page of finance/erp-invoice-export in production with six numbers and a memory chart. Its chart of messages per minute has deploy markers.
In Metrics, you see six numbers for an integration in one environment, such as failed messages and restarts. You see each deploy marked on its message and memory charts.

A counter whose attributes come from message data, such as one series per invoice number, makes a new series for each message. The metric store accepts at most 300,000 new series an hour and 1,500,000 a day for the whole installation. Past that it discards the samples of every new series. When that has happened, you see telemetry-dropped in the problem list and a warning in weikio-backend doctor.

Retention and forwarding#

Weik.io keeps metrics for 90 days. Telemetry forwarding sends the same metrics to the monitoring service you use:

  • Azure Monitor
  • Splunk
  • Any OTLP receiver

Prometheus metrics#

Each process also serves Prometheus metrics.

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo