我正在使用官方的Python(2.7)客户端。
我想定义一个带有一些标签的度量,但并不总是有所有标签需要发送。当我只发送其中一些时,会出现以下错误:
“AttributeError:'Counter' object has no attribute '_value'”
这是我使用的代码:
我想定义一个带有一些标签的度量,但并不总是有所有标签需要发送。当我只发送其中一些时,会出现以下错误:
“AttributeError:'Counter' object has no attribute '_value'”
这是我使用的代码:
c = Counter("counterTest, "explain this counter, labelnames=("label1", "label2",), namespace="namespace")
c.labels(label1="1").inc(1)
这是 Python 库的限制吗?还是 Prometheus 的限制?
labelvalues
最近变成了私有成员。 - Mo Kanj