AttributeError: 'Gauge' object has no attribute '_value'
registry = CollectorRegistry()
g = Gauge('caliper_tps', "", {"client":"0","instance":"open1", "round":"0"}, registry=registry)
g.set(0)
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/80428846-4a9c-4899-9d95-8afb9d9683ac%40googlegroups.com.
Hi,In the creation of the gauge, you need to only pass the label names (not the values), and then pass the label values when you set the gauge:g = Gauge('caliper_tps', "", ["client", "instance", "round"])
g.labels(client="0", instance="open1", round="0").set(0)Cheers,Julius
On Sat, Apr 11, 2020 at 7:31 AM Sungmin Jeun <ckdr...@gmail.com> wrote:
--Hi, I just create a gauge and assigned value with set() method.However error message saysAttributeError: 'Gauge' object has no attribute '_value'code is belowregistry = CollectorRegistry()
g = Gauge('caliper_tps', "", {"client":"0","instance":"open1", "round":"0"}, registry=registry)
g.set(0)How can i set value to guage metric?
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to promethe...@googlegroups.com.