-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Description
Hello,
I implemented a custom MongoDB metric data store. While testing it, I noticed that counters with no labels are reset every time I relaunch my application. This does not happen to labeled counters.
After inspecting the code, it looks like this line resets the counters:
| init_label_set({}) if labels.empty? |
From top of my head I can't think of a scenario when this behaviour would be useful for counters or other metric types. Also, based on the tests, store should handle nil cases and initialise values to 0.0 before incrementing:
| metric_store.increment(labels: { foo: "zzz" }, by: 3) |
Would it be safe to remove it?
Thank you,
Alex
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels