Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Implement deletion of Gauge metrics based on partially specified labels #1118

Copy link
Copy link
@TheGameProfi

Description

@TheGameProfi
Issue body actions

In many cases, the labels of a Gauge are fixed and known, but sometimes it’s hard to keep track of all labels, for example with an HTTP request collector per endpoint.

It would be very useful to have a method to delete metrics by matching a subset of labels. For example, deleting all metrics with status_code="200" regardless of other labels.

I ran into this issue myself when scraping disk data from multiple instances. On reset I wanted to remove only a specific instance's metrics, but ended up removing all.

The Go client (client_golang) has a DeletePartiallyMatching method.
prometheus/client_golang#834

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.