prometheus / prometheus/client_python

Why is the restriction on name in class MetricWrapperBase to comply with the METRIC-NAME-RE rule?

Open
#1,039 0 comments 0 reactions 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

Why is the restriction on name in class MetricWrapperBase to comply with the METRIC-NAME-RE rule? If I replicate init by inheriting the MetricWrapperBase class, there may be an inconsistency in the transfer of label_values when upgrading to a higher version. I am using version 0.7.1

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 with the MetricWrapperBase class and the METRIC-NAME-RE rule, then compare its initialization behavior with version 0.7.1 and later versions. Trace how label_values is transferred when inheriting and replicating init; the issue is resolved when the restriction and any version-upgrade inconsistency are confirmed or documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.