Skip to content
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

feat: Add namespace and subsystem configuration #193

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

phbernardes
Copy link
Contributor

  • Accept namespace and subsystem parameters in instrument definition.

Hi, I open this PR to be able to set the namespace and subsystem during instrumentation initialisation.

Having this parameter is important for projects where several metrics endpoints are fetched and metrics are squashed together.

This will allow us to have the same behaviour as prometheus-flask-instrumentator (when using the defaults_prefix argument of PrometheusMetrics).

Thank you.

Copy link

@M3g4lodon M3g4lodon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fulfill our needs for our app in production!

@phbernardes
Copy link
Contributor Author

@trallnag do you think this PR can be merged?

* Accept namespace and subsystem parameters in instrument definition.
@trallnag trallnag changed the title feat: namespace and subsystem configuration. feat: Add namespace and subsystem configuration Feb 22, 2023
@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

Merging #193 (fd8dd90) into master (e545785) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #193   +/-   ##
=======================================
  Coverage   91.07%   91.07%           
=======================================
  Files           5        5           
  Lines         280      280           
=======================================
  Hits          255      255           
  Misses         25       25           
Impacted Files Coverage Δ
...ometheus_fastapi_instrumentator/instrumentation.py 90.90% <100.00%> (ø)
...rc/prometheus_fastapi_instrumentator/middleware.py 88.15% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@trallnag trallnag merged commit c70cccb into trallnag:master Feb 22, 2023
@trallnag
Copy link
Owner

Thank you, @phbernardes

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.

4 participants