-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Exception event missing from activity in HttpClient native instrumentation #108050
Comments
Tagging subscribers to this area: @dotnet/ncl |
System.Net.Http.DiagnosticsHandler can report the exception to DiagnosticListener, but apparently not to Activity: runtime/src/libraries/System.Net.Http/src/System/Net/Http/DiagnosticsHandler.cs Lines 182 to 188 in c4d7f7c
The implementation could perhaps use the Activity.AddException API from #102905. AFAICT, this API is not called by anything in .NET Runtime yet. |
Tagging subscribers to this area: @dotnet/ncl |
cc @antonfirsov |
The event created by @KalleOlaviNiemitalo I'm wonderering if the value of Triage: if needed, this is trivial to implement. I'm tentatively putting this into .NET 10. |
@antonfirsov I don't have a use case, I only commented on how the event requested by @joegoldman2 could be implemented. |
The exception gives more details in some cases (maybe not in my example above). |
When using OpenTelemetry (
OpenTelemetry.Instrumentation.Http
) to instrument outgoing HTTP requests, exception is captured as event in the activity. However, when using the native instrumentation, the exception event is not present.With
OpenTelemetry.Instrumentation.Http
:With native instrumentation (
.AddSource("System.Net.Http")
):When using native instrumentation, I think the exception should also be captured as an event in the activity.
The text was updated successfully, but these errors were encountered: