【发布时间】:2020-01-06 13:10:59
【问题描述】:
我使用的是官方的python(2.7)客户端。
我想定义一个带有一些标签的指标,但我并不总是让它们发送所有标签。当我只发送其中一些时,我得到了错误:
AttributeError: 'Counter' 对象没有属性 '_value'
这是我使用的代码:
c = Counter("counterTest, "explain this counter, labelnames=("label1", "label2",), namespace="namespace")
c.labels(label1="1").inc(1)
这是 python 库中的限制吗?或者可能是对 Prometheus 端的限制?
【问题讨论】:
标签: python python-2.7 prometheus