-
Notifications
You must be signed in to change notification settings - Fork 516
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
fix: Make Spans initiated in Instrumentation for HTTP Frameworks of Kind Server #2307
base: main
Are you sure you want to change the base?
Conversation
Make sure the span is of kind server for exception tracking purposes
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.
It would be nice to get update the tests for all of these changes so we can enforce it doesn't regress in the future.
I think that this behavior is intentional. AFAIK in this context only http spans are supposed to be So any kind of a middleware span is an internal span (it's neither server nor client, it's in the middle -> internal). From the spec:
this applies here, the middleware span does not have any remote parents or children, only the http span does. |
I agree. @XVincentX Does pichlermarc's explanation above make sense? Can you provide more details on:
|
@trentm I am no expert enough in OpenTelemetry to say whether that is correct or not - I thought it was a bug, but I believe your assessment.
|
I believe this may be an issue that's better suited for the Azure SDK repo 🤔 cc @hectorhdzg IIRC you're working on the JS Azure SDK, right? 🤔 |
@XVincentX can you describe your scenario and what exactly are you trying to achieve in Azure Monitor side? are you expecting to see all instrumentation errors in your exception table in Application Insights? I don't believe any instrumentation different to HTTP currently call recordException in the Span, so even making the span internal you will not get exception telemetry as you are expecting. |
Which problem is this PR solving?
The Span Kind in the all the HTTP framework instrumentations is not specified, making it
internal
by default.A lot of providers, including Azure, is not reporting exceptions events in the spans if marked as internal.