prom-client
prom-client copied to clipboard
Does prom-client handle missing metrics?
- Does prom-client set a default value for a metric till a value hasn't been explicitly set https://prometheus.io/docs/practices/instrumentation/#avoid-missing-metrics
I'm pretty sure I've seen cases where it does not, but haven't had the time to really dig into the code or repro, its just a note sitting in my long todo list.
Do you have a small reproduction that shows this bug?
Nope, I'm pretty sure that a metric needs a value before being present in the registry. PR is welcome :)
Related, with docs reference: https://github.com/siimon/prom-client/issues/233#issuecomment-450903295