-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Most Prometheus clients apply a timeout on metrics collection, but this doesn't seem to be the case for the Ocaml prometheus client.
The Prometheus scrape requests even add a specific header (X-Prometheus-Scrape-Timeout-Seconds) to each scrape request defining the timeout that is used at the server-side.
However, I assume that the timeout only closes the connection when no response is received within this timeout and I guess the Prometheus client already sends back a response even when all metrics are not collected yet. Because I'm seeing scrape durations (up to 1000s) exceeding largely the scrape timeout (30s).
I'm guessing it would be a good idea to apply a timeout on metrics collection and perhaps also try to only send a response when metrics collection is finished.