-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
.NET 9.0
Native Trace Instrumentation Support for HttpClient as per OTel specification
#93019
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsCurrent StateCurrently, users depend on the instrumentation library provided by the OpenTelemetry .NET repository to enable the enrichment of activities created during HttpClient requests, following the OpenTelemetry specification. This instrumentation library enriches activities by subscribing to DiagnosticSource events generated by HttpClient. However, this approach has certain limitation. Feature RequestWe are requesting the addition of native instrumentation support for HttpClient in Design ConsiderationsWhen designing this feature, we need to consider the following aspects:
|
@tarekgh @cijothomas FYI |
And the performance overhead of ds listeners/reflection etc. |
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti Issue DetailsCurrent StateCurrently, users depend on the instrumentation library provided by the OpenTelemetry .NET repository to enable the enrichment of activities created during HttpClient requests, following the OpenTelemetry specification. This instrumentation library enriches activities by subscribing to DiagnosticSource events generated by HttpClient. However, this approach has certain limitation. Feature RequestWe are requesting the addition of native instrumentation support for HttpClient in Design ConsiderationsWhen designing this feature, we need to consider the following aspects:
|
Moved this to /cc @noahfalk |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsCurrent StateCurrently, users depend on the instrumentation library provided by the OpenTelemetry .NET repository to enable the enrichment of activities created during HttpClient requests, following the OpenTelemetry specification. This instrumentation library enriches activities by subscribing to DiagnosticSource events generated by HttpClient. However, this approach has certain limitation and performance overhead of Diagnostic Source listeners and reflection. Feature RequestWe are requesting the addition of native instrumentation support for HttpClient in Design ConsiderationsWhen designing this feature, we need to consider the following aspects:
|
Talked offline with @noahfalk and changed it back to http as the work will be in http. |
@vishweshbankwar a question regarding the timing of tag injection and enrichment: opentelemetry-dotnet's HttpHandlerDiagnosticListener sets some of the tags at |
In the current implementation which is based on the diagnostic source callbacks, there was no way to allow enrich via single API (due to different callbacks with different information). If that constraint is not valid for instrumentation within the library, it makes sense to have a simpler API. |
Current State
Currently, users depend on the instrumentation library provided by the OpenTelemetry .NET repository to enable the enrichment of activities created during HttpClient requests, following the OpenTelemetry specification. This instrumentation library enriches activities by subscribing to DiagnosticSource events generated by HttpClient. However, this approach has certain limitation and performance overhead of Diagnostic Source listeners and reflection.
Feature Request
We are requesting the addition of native instrumentation support for HttpClient in
.NET 9.0
. This enhancement will complement the out-of-the-box OTel metrics instrumentation introduced in.NET 8.0
.Design Considerations
When designing this feature, we need to consider the following aspects:
Support for Enrichment and Filtering of Spans: Ensure that the native instrumentation supports the enrichment and filtering of HttpClient spans.
Custom Propagators: Address the differences in API between propagators in OpenTelemetry and the
DistributedContextPropagator
. Determine how custom propagators should be handled in this context.The text was updated successfully, but these errors were encountered: