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 method to http_request_duration_seconds metric #251

Merged
merged 5 commits into from
Jul 15, 2023

Conversation

alcidesmig
Copy link
Contributor

What does this do?

This adds the "method" label to http_request_duration_seconds metrics.

Why do we need it?

The difference between, e.g., GET /books and POST /books are big. In the rest APIs scenario, it becomes important to distinguish between duration metrics for different methods, and exporting the method should be the default behavior.

@codecov
Copy link

codecov bot commented Jul 15, 2023

Codecov Report

Merging #251 (e5a3b4e) into master (a18d361) will not change coverage.
The diff coverage is 100.00%.

❗ Current head e5a3b4e differs from pull request most recent head c64308d. Consider uploading reports for the commit c64308d to get more accurate results

@@           Coverage Diff           @@
##           master     #251   +/-   ##
=======================================
  Coverage   95.68%   95.68%           
=======================================
  Files           5        5           
  Lines         348      348           
=======================================
  Hits          333      333           
  Misses         15       15           
Impacted Files Coverage Δ
src/prometheus_fastapi_instrumentator/metrics.py 93.70% <100.00%> (ø)

@trallnag trallnag merged commit 667f68c into trallnag:master Jul 15, 2023
5 checks passed
@trallnag
Copy link
Owner

Thank you

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