Skip to content

v1.15.0

Compare
Choose a tag to compare
@github-actions github-actions released this 14 Jan 23:19
· 2 commits to main since this release

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)