-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[telemetry] Centralize (as much as is practical) the creation of spans to ease upgrades #13887
[telemetry] Centralize (as much as is practical) the creation of spans to ease upgrades #13887
Conversation
…ed for core-tracing to compile and test
…ich will shortly have a new OT)
…s a bit more complicated)
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run js - storage-queue - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run js - storage-file-share - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run js - storage-queue - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/identity/identity/src/credentials/managedIdentityCredential/imdsMsi.ts
Show resolved
Hide resolved
sdk/identity/identity/src/credentials/managedIdentityCredential/index.ts
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.
For identity this looks good!
parent: span.context(), | ||
attributes: { | ||
...spanOptions.attributes, | ||
"az.namespace": args.namespace |
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.
If we moved this to the original spanOptions
, would we need to call span.setAttribute on our span
object?
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.
I'd have to try that out (I reserve that for another PR) but that makes logical sense to me. I moved this code so there might be some subtle behavior that I'm not aware of.
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 to me.
Thank you all for your help reviewing! :) |
/azp run js - keyvault - ci |
The opentelemetry package recently removed a field we were all using to propagate spans (.parent). This ends up breaking an unreasonable number of places because we have multiple copies of the 'createSpan' function in the codebase.
We already had a pretty solid version that would generate a personalized createSpan function for you so I moved that into azure/core-tracing and have changed everyone to call it instead.
For the most part this should be pretty straightforward to review. Apart from centralizing the createSpan calls (and moving code into core-tracing) I've made no code changes.