prometheus / prometheus/client_python

How to set custom metrics endpoint using MetricsHandler/BaseHTTPRequestHandler?

Open
#919 0 comments 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

Hi, in the README it says to use BaseHTTPRequestHandler to write a custom metrics endpoint but doesn't elaborate at all on how it's used. Is there an example or guide that someone could give to show how it could be used?

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 README's mention of BaseHTTPRequestHandler and inspect the MetricsHandler usage in the project. Add a focused example or guide showing how to configure a custom metrics endpoint, with enough context for users to follow it from the README.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.