Skip to content
Weik.ioUniversity
Try Weik.io

Custom metrics

Camel 6 · 3:03

An integration can count something of its own, such as invoices processed, with one more 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 Camel videos left hello running in devtest.
  2. 0:04This video gives hello's route a figure of its own and reads it back.
  3. 0:13hello runs on agent dev,
  4. 0:15and the platform already counts its messages.
  5. 0:18It stands for an integration that
  6. 0:20sends one invoice per message.
  7. 0:23The word for a figure the platform keeps is metric.
  8. 0:31hello's route file, hello.camel.yaml, ends at the log step.
  9. 0:37The counter is one more step after the log step,
  10. 0:40four lines long.
  11. 0:41The step names the component
  12. 0:43micrometer and the kind counter.
  13. 0:45The name comes third, invoices.processed.
  14. 0:49One parameter carries the description, Invoices processed.
  15. 0:54Nothing else is declared,
  16. 0:55no dependency and no platform setting.
  17. 0:58Give a counter fixed values, never one taken from the message,
  18. 1:02because each value is kept as a count of its own.
  19. 1:11The run publishes the folder and deploys it to devtest.
  20. 1:15The hub builds the folder into a new version.
  21. 1:18The integration row gives the version and the build time.
  22. 1:22Ctrl-C ends the follow, and the integration keeps running.
  23. 1:31The deployment follows the newest version.
  24. 1:36The platform sends its figures every thirty seconds,
  25. 1:40so a minute or two passes.
  26. 1:42The counter table names the counter, its count,
  27. 1:45its rate a minute and the route.
  28. 1:47The last column says which route counts it,
  29. 1:50and here that is hello.
  30. 1:52The metric store keeps the counter
  31. 1:53beside the integration's other figures.
  32. 1:58weikio status asks the platform about the deployment.
  33. 2:02The row gives the version, the state and the agent.
  34. 2:06The Last hour line puts invoices.processed beside the message count,
  35. 2:11the failures and the memory.
  36. 2:17The admin UI shows the same counter on hello's page.
  37. 2:21The page covers the last hour,
  38. 2:23and the Counters fold is closed.
  39. 2:26A click opens it.
  40. 2:28The row holds the counter, its description, the count,
  41. 2:32the rate a minute and a chart over the hour.
  42. 2:35The route column reads hello.
  43. 2:42hello counts its own invoices.
  44. 2:45The counter is one more step after the log step.
  45. 2:48The hub keeps it with the integration's figures.
  46. 2:51The Weik.io CLI and the admin UI read the counter.