g = Gauge(metric, "test", "tests")
g.labels('value0').set(serviceinforesult[item])
But intellisense says "Instance of Gauge has no 'labels' member".
So when I take the labels off and run it like this:
g = Gauge(metric, "test", "tests")
g.set(serviceinforesult[item])
it throws "AttributeError: '_LabelWrapper' object has no attribute 'set'"
What am I doing wrong?
-Tommy
This email and any files transmitted with it are confidential. If you have received this email in error please delete it immediately. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of DHI. Finally, this email and attachments have been scanned for viruses; however, DHI Computing Service accepts no liability for any damage caused by any virus transmitted by this email.
g = Gauge(metric, "test", "tests")
g.labels('value0').set(serviceinforesult[item])
--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/5e3e14e3-7a4a-53cf-37ce-93543d2fb5b4%40goldpointsystems.com.
For more options, visit https://groups.google.com/d/optout.
That did not help, I got the same error. I'm using Python 3.6. I
have my code written the in the second form that I mentioned. I
don't care about labeling at the moment, I'm just trying to get my
data to write out with Gauge. I can provide more of my code if
needed.
it still throws "AttributeError: '_LabelWrapper' object has no attribute 'set'"
Didn't work. Intellisense says "no value for argument
'labelvalues' in construct or call."
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/5e3e14e3-7a4a-53cf-37ce-93543d2fb5b4%40goldpointsystems.com.
For more options, visit https://groups.google.com/d/optout.
This email and any files transmitted with it are confidential. If you have received this email in error please delete it immediately. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of DHI. Finally, this email and attachments have been scanned for viruses; however, DHI Computing Service accepts no liability for any damage caused by any virus transmitted by this email.