[core] Create spans using automatic span propagation #31019
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Packages impacted by this PR
@azure/core-rest-pipeline
@typespec/ts-http-runtime
Issues associated with this PR
N/A
Describe the problem that is addressed by this PR
Back when we were migrating to the new core tracing we wanted to be cautious and
bail as early as possible in our core tracing policy. This meant that we:
tracingClient.withSpan to kick off the manual span propagation (context
parameter passing in options)
Now that we have RLC which does not have a tracingClient, and having had this
code in production for quite some time, we can remove the optimization that
aassumes the tracingContext will be added upstream.
This is a non-impactful change for high-level clients or anyone who has not opted-in to OTel tracing.
For users who use rest-level clients and have opted into OTel, they will now see HTTP spans from core added correctly
Are there test cases added in this PR? (If not, why?)
Updated test expectation
Provide a list of related PRs (if any)
Command used to generate this PR: (Applicable only to SDK release request PRs)
Checklists