prometheus / prometheus/client_python
Publically expose immutable attributes on MetricWrapperBase
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 876
- Avg merge
- 8d 4h
- Merged PRs (30d)
- 1
Description
things like MetricWrapperBase._labelnames are immutable, but are passed in as parameters when instantiating MetricWrapperBase objects. These would be useful if they were exposed?
@property
def labelnames(self) -> Tuple[str, ...]:
return self._labelnames
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate MetricWrapperBase and inspect the immutable attributes passed during construction, using _labelnames and the proposed labelnames property as the starting point. Determine which similar attributes should be publicly readable without mutation, then run the relevant test suite and confirm those values are exposed consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100