prometheus / prometheus/client_python

Possibility to remove metrics

Open
#696 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.4k
Forks
876
Avg merge
8d 4h
Merged PRs (30d)
1

Description

I have a use case where I need to remove certain sub-metrics from a labeled metric. Ideally I could remove a bunch of them with a wildcard filter. The idea is to extend the .remove() method and allow for keyword arguments according to the defined label names as in the .labels(...) method. By not providing certain label names one could apply a wildcard operation.

Also would be happy to make a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the metric .remove() implementation and the .labels(...) handling in the Python client. Define the behavior for keyword label arguments, including omitted labels as wildcards, and consider how removing multiple matching sub-metrics should be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.