-
Notifications
You must be signed in to change notification settings - Fork 774
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
Enable OnException for AspNetCore instrumentation #1408
Enable OnException for AspNetCore instrumentation #1408
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1408 +/- ##
==========================================
- Coverage 81.33% 81.26% -0.07%
==========================================
Files 227 227
Lines 6097 6112 +15
==========================================
+ Hits 4959 4967 +8
- Misses 1138 1145 +7
|
src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs
Show resolved
Hide resolved
@pakrym FYI. |
Does this mean that Azure SDKs should put the message into description as well? |
src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs
Show resolved
Hide resolved
Not sure I understood. Could your clarify? |
src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
Recently @reyang mentioned in the email "We SHOULD NOT add any exception object to the Span. How to report an exception is not in the scope this year. I think most likely we will be using logs" but it looks like this PR uses |
This is probably specific to Microsoft specific Exporters. We can discuss it offline. This PR is just making this repo compliant to the OpenTelemetry specs: |
@eddynaka Are you going to add a test for this? |
src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs
Show resolved
Hide resolved
i was thinking how i would do that. |
@eddynaka For the test... Lines 146 to 152 in 41cd4f5
I think all you need is for that callback to throw an unhandled exception. You could have the test add something to request query string like "?throw=true" which you could detect off the context in the callback? Might work 😄 |
…b.com/eddynaka/opentelemetry-dotnet into feature/enable-onexception-aspnetcore
Thanks for the guidance! just pushed one change testing the exception. |
Fixes #1405.
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes