Global counters for all users? #3596
Replies: 1 comment
-
IMHO, metrics won't be reliable here. Traces might work, but you need to keep them, Best, for such situations is to simply log an event - "Started", and if you can "Stopped" (or "Crashed", if you have crash handler to do that for you). -- But let's give it a try with metrics. You can emit a metric And here is the catch, sending something like But even then, all you'll get is watermarks - e.g. how many concurrent apps were running (per machine, overall, etc.) You can try and find gaps - "Oh here, no metric was emitted, so must've been stopped"... But no - due to sampling effects, this is not something you can rely on. All in all, metrics is not the best tool for the job - but must be something event based - like logs, or if you can trace |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm experimenting with opentelemetry and prometheus. Say I would like to know how many times the application has been started today for all users aggregated (e.g. if user 1 runs it twice, and user 2 four times, I want to see "The application has been run 6 times today"). I have got counter working, but the value stays '1' in the prometheus dashboard, no matter how many times I run the code.
Am I understanding the use of the telemetry wrong or am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions