Support OpenMetrics 2.0 exposition format
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- prometheus, python
- Domain
- backend-api-design, observability
Research direction
Review the linked PRs (#1104, #1087) and issue #1122 to understand the current OpenMetrics support. Examine the client_golang PR #2132 for the implementation approach. The work involves modifying the exposition logic, likely in the core metrics generation and HTTP handler code, to negotiate and produce OpenMetrics 2.0 format. Testing will require verifying the output against the OpenMetrics 2.0 specification.
Written by the indexing model from the issue text.
Description
OpenMetrics 2.0 is now available (experimental): https://prometheus.io/docs/specs/om/open_metrics_spec_2_0/
Prometheus common have it implemented https://github.com/prometheus/common/issues/893
A PR is on the way for client_golang https://github.com/prometheus/client_golang/pull/2132
It would be nice for client_python to support exposing OpenMetrics 2.0 as well.
Proposed approach, mirroring what client_golang:
- Keep a single existing opt-in switch for OpenMetrics exposition rather than adding a second flag specifically for 2.0.
- Once OpenMetrics exposition is opted into, rely purely on content neciation.
Related work:
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 876
- Avg merge
- 8d 4h
- Merged PRs (30d)
- 1
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.
More from prometheus/client_python
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
prometheus/client_python#1177 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
prometheus/client_python#1199 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
prometheus/client_python#1176 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 52/100
prometheus/client_python#1126 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
prometheus/client_python#1123 ·
All issues in prometheus/client_python
Similar issues
-
agent-ready documentation needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
instance instance add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
searxng/searx-instances#939 · 1 comment ·
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100