Thank you so much!
Now I get it!

2020년 4월 11일 토요일 오후 2시 39분 6초 UTC+9, Julius Volz 님의 말:
>
> 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 <[email protected] 
> <javascript:>> wrote:
>
>> Hi, I just create a gauge and assigned value with set() method.
>> However error message says 
>>
>>> AttributeError: 'Gauge' object has no attribute '_value'
>>
>>  
>> code is below 
>>
>>> registry = 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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/prometheus-users/80428846-4a9c-4899-9d95-8afb9d9683ac%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/prometheus-users/80428846-4a9c-4899-9d95-8afb9d9683ac%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/9d7d85cd-522f-4dc9-be5e-7cf2c67f809f%40googlegroups.com.

Reply via email to