Open zhangweijiqn opened 8 months ago
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?
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