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.
Fixes [Tracing] Allow Client libraries to configure schema URL #23307
This PR allows a schemaURL to be passed to the NewTracer function so that consumers can create tracers that use a different schemaURL than azcore.
It updates azcore to use the otel semconv package that sets a schemaURL and then uses the semconv Constances for the span keys that have defined semconv keys.
This PR also adds a
WithCoreTracerName
function to the azcore client so the consumers that do want to do custom tracing can make azcore using azcore's module name and version for the HTTP tracing, and their own module name and version for their portion of the tracing. UsingWithCoreTracerName
only changes the values used for tracing to azcore values, it still leaves the passed in module name and version for use with the HTTP User Agent header.I chose this approach because it looks like many of the consumers of this client