v1.15.0
v1.15.0 (2025-01-14)
[minor]
- add prometheus global label wrapper [minor] (#109)
Add global / common labels for prometheus metrics.
Example usage::
metrics = GlobalLabels({"instance": "test-abc", "part": "a"})
c = metrics.counter("thing", "The Thing")
c.inc()
# will have labels for instance and part
c2 = metrics.counter("thing", "Thing 2", {"part": "b"})
c2.inc()
# will have labels for instance and part, with part=b
c3 = metrics.counter("thing", "Thing 2", {"extra": "test"})
c3.inc()
# will have labels for instance, part, and extra
Co-authored-by: github-actions <github-actions@github.com> (4abaa64
)