-
Notifications
You must be signed in to change notification settings - Fork 167
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
Recommended histogram bucket sizes for HTTP connection duration #336
Comments
related: #316 |
I am suggesting: in #open-telemetry/opentelemetry-dotnet#4922 It uses an approx 2x escalation for each bucket with alignment to minutes at the end. It doesn't go up to hours, but the main benefit for longer connections is that you don't need to pay the setup costs of each connection on each request. Once the connection duration is in the order of minutes, the incremental cost of benefit of longer connections rapidly diminishes. This should be a good balance. |
Up to 300 seconds is much better than 10 seconds. I think there are situations where a connection could live quite a long time. For example, web sockets in the browser (e.g. SignalR) and server-to-server scenarios where a client is reused for a long time. I removed some of the smaller values and added capacity for up to an hour. Before: After: TBH I'm not sure exactly where most connection lifetimes end up. I would be ok with tracking up to 300 seconds and then adjusting if needed. Update: |
The
http.server.request.duration
histogram recommends bucket sizes:semantic-conventions/docs/http/http-metrics.md
Lines 67 to 68 in 203691d
A server library has a histogram to track HTTP connection duration. It should have defined bucket sizes, but I'm are unsure what values to set. The HTTP request durations are too short (a connection could last, minutes, hours or even days).
Is there any agreement in the OTEL ecosystem about what good histogram buckets are for HTTP connection duration? (or longer running tasks in general)
The text was updated successfully, but these errors were encountered: