Replies: 2 comments
-
Realized the issue was that |
Beta Was this translation helpful? Give feedback.
-
registry = CollectorRegistry() For the above snippet of Code, I get the following error - Can some one help with how to set the labels correctly with Gauge ? Also, if the labels are that critical for correct functioning, I believe that README.md should reflect them. |
Beta Was this translation helpful? Give feedback.
-
I was trying to follow https://github.com/prometheus/client_python#exporting-to-a-pushgateway, but adding a label to my metric, something like
With this, I was getting this error
ValueError: gauge metric is missing label values
. It looks like in [1] that we can't have labels when callingset_to_current_time()
? Is that correct? The documentation seems to always suggest callingset_to_current_time()
for gauges, but it's not clear to me what purpose it serves. Regardless though, I would ideally like to track when the metric is recorded and use it with labels. Any help on how to do this would be appreciated. Thanks![1] https://github.com/prometheus/client_python/blob/master/prometheus_client/metrics.py#L81
Beta Was this translation helpful? Give feedback.
All reactions