-
Notifications
You must be signed in to change notification settings - Fork 785
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
[HttpClient & ASP.NET Core] Document request durations #5079
[HttpClient & ASP.NET Core] Document request durations #5079
Conversation
Co-authored-by: Anton Firszov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client part looks good.
Would it be useful to include the links to the learn.microsoft doc that defies the metric? |
The link to metrics are already included in Readme. https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Instrumentation.AspNetCore#list-of-metrics-produced |
Fixes #3277
Design discussion issue #
Changes
Borrowing the definitions from https://learn.microsoft.com/en-us/dotnet/core/diagnostics/built-in-metrics-system-net#instrument-httpclientrequestduration and https://learn.microsoft.com/en-us/dotnet/core/diagnostics/built-in-metrics-aspnetcore#instrument-httpserverrequestduration as the implementations record the times around the same time when DiagnosticSource events are written.
For ASP.NET Core: Validated the metrics are recorded same time as DiagnosticSource callbacks are fired.
https://github.com/dotnet/aspnetcore/blob/5b1ad1ee4934be7d587e50670524876763cd45eb/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs#L156-L211
For HttpClient: Checked the handler configuration https://github.com/dotnet/runtime/blob/49d7bc83d986c32e8678001c841b1b836bc3e428/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs#L40-L45 and also confirmed with @antonfirsov
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes