-
Notifications
You must be signed in to change notification settings - Fork 780
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
Add support for .NET8.0 HttpClient metrics #4931
Add support for .NET8.0 HttpClient metrics #4931
Conversation
Codecov Report
@@ Coverage Diff @@
## main open-telemetry/opentelemetry-dotnet#4931 +/- ##
==========================================
+ Coverage 83.26% 83.29% +0.02%
==========================================
Files 295 295
Lines 12375 12378 +3
==========================================
+ Hits 10304 10310 +6
+ Misses 2071 2068 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.cs
Outdated
Show resolved
Hide resolved
@JamesNK please review |
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
src/OpenTelemetry.Instrumentation.Http/MeterProviderBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.Http/MeterProviderBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.Http/MeterProviderBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
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.
Looks good.
Some comments from #4934 (review) are applicable here as well.
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
src/OpenTelemetry.Instrumentation.Http/MeterProviderBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
.Replace("{flavor}", "1.1"); | ||
#else | ||
.Replace("{flavor}", "2.0"); |
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.
This is kind of interesting. How is it we don't report 2.0 now?
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.
@CodeBlanch See #4928
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.
Some non-blocking feedback, LGTM
Towards open-telemetry/opentelemetry-dotnet-contrib#1753
Details: open-telemetry/opentelemetry-dotnet-contrib#1753
open-telemetry/opentelemetry-dotnet-contrib#1753
Changes
This PR adds support for metrics enablement that are part of
.NET8.0
. ForHttpClient
the following meters will be added to the MeterProviderBuilder when application targets.NET8.0
framework:Meter :
System.Net.Http
http.client.request.duration
http.client.active_requests
http.client.open_connections
http.client.connection.duration
http.client.request.time_in_queue
Meter :
System.Net.NameResolution
dns.lookups.duration
Users may selectively opt-out with the help of views.
TODO: Update Readme
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes