Skip to content
Weik.ioUniversity
Try Weik.io

Custom metrics

Camel 6 · 3:14

An integration can count something of its own, such as invoices processed, with a step in its route. The weikio CLI and the admin UI show that counter beside the integration's other figures.

Download the mp4Recorded on 2026.2

What it covers

  • A Micrometer counter step, invoices.processed, after the log step in hello.camel.yaml
  • Why a counter's values are fixed in the route, since each distinct value is kept as a count of its own
  • Publishing and deploying the change with weikio run
  • The counter table from weikio metrics, with its count, rate a minute and route
  • The Last hour line of weikio status
  • Opening Counters on hello's page in the admin UI, with the count, the rate a minute and a chart of the last hour

Commands in this video

Terminal
$ weikio run ./hello
$ weikio metrics sandbox/hello
$ weikio status sandbox/hello
Transcript
  1. 0:01The earlier Camel videos left hello running in devtest.
  2. 0:05This video adds a step that counts hello's invoices, then reads the count with the platform's figures.
  3. 0:15hello runs in devtest on agent dev, from the hello folder.
  4. 0:19The platform already counts hello's messages,
  5. 0:22failures and memory.
  6. 0:24Your Weik.io installation keeps these as metrics.
  7. 0:28This video adds a metric you declare in the route.
  8. 0:35hello's route ends at the log step.
  9. 0:37A counter step follows it, in four new lines.
  10. 0:41The address holds three parts: the micrometer component,
  11. 0:45the kind counter that only goes up, and the name invoices.processed.
  12. 0:51Readers show the description Invoices processed beside that name.
  13. 0:55Nothing else is declared:
  14. 0:57no dependency, no installation setting.
  15. 1:01The counter takes nothing from the message,
  16. 1:03which only decides when the step runs.
  17. 1:06The store keeps a count for each set of values,
  18. 1:09so a counter opened per message runs into the store's limit.
  19. 1:17weikio run hello publishes the folder to your Weik.io installation.
  20. 1:23Ctrl-C ends the log follow, and hello keeps running.
  21. 1:27Weik.io builds the folder into a version.
  22. 1:30A version is built once, then never changes.
  23. 1:35The deployment follows latest,
  24. 1:37so the newest version is what runs now.
  25. 1:43A deployment sends figures every thirty seconds,
  26. 1:46so a new counter shows at the next send.
  27. 1:49weikio metrics sandbox/hello prints hello's figures,
  28. 1:55then its counters.
  29. 1:57The table gives the counter, its count,
  30. 2:00its rate a minute, and its route.
  31. 2:02The default window is the last hour.
  32. 2:07weikio status sandbox/hello prints the version that runs,
  33. 2:12the state, and the agent that runs it.
  34. 2:15The last hour line carries invoices.processed beside the platform's figures.
  35. 2:25Read the same figure on hello's Metrics page in the admin UI.
  36. 2:29hello's counters live under the Counters fold,
  37. 2:32whose heading names this one.
  38. 2:34The window is the last hour.
  39. 2:36A click opens the fold.
  40. 2:39The opened row runs from the counter and its description to the count,
  41. 2:43the rate, a chart and the route hello.
  42. 2:50hello counts the invoices it handles, from the last lines of its route.
  43. 2:55The counter lives in Weik.io, kept with hello's other figures.
  44. 2:59Two readers reach the same figure, the Weik.io CLI and the admin UI.

Sign in to the live demo

Sign in with the shared viewer account, which can open every screen of the example projects and can't change anything.

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