-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use current span for SDK-less context propagation (#510)
In the absence of an SDK the API should not record spans anymore but it should propagate the span context. In our case absence of an SDK means we're using the `NoopTracer`. There are different ways to create new spans and they provide different ways of specifying the parent context: - Tracer::start: uses Context::current() - Tracer::build: uses the context from the span builder or falls back to the current context. BUT it did not have the fallback in the NoopTracer. - Tracer::start_with_context: uses the specified context This changes the `SpanBuilder` to make the `parent_context` in it non-optional. That way the current context fallback is done on `SpanBuilder` creation. Tracer implementations just need to read the `parparent_context` from the span builder.
- Loading branch information
Showing
3 changed files
with
52 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters