Skip to content

docs: Correct custom_labels usage example in README #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

newrachael
Copy link

What does this do?

Corrects the example code in README.md regarding the usage of the custom_labels parameter. Specifically, it removes the incorrect example showing custom_labels being passed to the Instrumentator constructor and clarifies that it should be passed to individual metric functions via the add() method.

Why do we need it?

The previous example in the "Creating the Instrumentator" section of README.md incorrectly showed custom_labels as a parameter for the Instrumentator constructor. This does not align with the actual code implementation and could confuse users trying to add custom labels to their metrics. This PR fixes the documentation to accurately reflect the correct usage.

Who is this for?

This documentation fix is for all users of the prometheus-fastapi-instrumentator library, especially those looking to add custom labels to their Prometheus metrics.

Linked issues

N/A (If this addresses a specific issue, replace N/A with Resolves #issue_number)

Reviewer notes

This is a straightforward documentation fix to align the README.md examples with the actual code implementation for custom_labels. No code changes are involved.

@andermirik
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants