Replies: 2 comments
|
Realized the issue was that |
0 replies
|
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. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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
All reactions