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

How to return flask_http_request_duration_milliseconds_bucket instead of flask_http_request_duration_seconds_bucket #172

Open
zhangweijiqn opened this issue Mar 13, 2024 · 1 comment

Comments

@zhangweijiqn
Copy link

for example:
flask_http_request_duration_seconds_bucket{le="0.005",method="POST",path="/predict",status="200"} 2.0
flask_http_request_duration_seconds_bucket{le="0.01",method="POST",path="/predict",status="200"} 2.0

--->

flask_http_request_duration_milliseconds_bucket{le="5",method="POST",path="/predict",status="200"} 2.0
flask_http_request_duration_milliseconds_bucket{le="10",method="POST",path="/predict",status="200"} 2.0

@rycus86
Copy link
Owner

rycus86 commented Mar 13, 2024

The library only supports seconds at the moment for the default metric (as showed in https://prometheus.io/docs/practices/histograms/) but you can add your own histogram metric with measurements - though perhaps a bit fiddly.
I'd be open to a change to allow asking for millisecond precision by default - is that something you could look into?

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

No branches or pull requests

2 participants