forked from open-telemetry/opentelemetry-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving active span interaction To TracerProvider
Fixes open-telemetry#455. The previous spec stated that the active span get / set behavior MUST behave the same across Tracers retrieved from the same TracerProvider. As such, the active span manipulation methods are better provided by the TracerProvider directly. As it is still cumbersome to retrieve the current TracerProvider simply to get the current span, add in the concept of a "Trace Package", that can provide utilty methods to delegate to the configured default TracerProvider. This enables a fluid interface to retrieve the current span: from opentelemetry import trace current_span = trace.get_current_span() To help maintain backwards compatibility, the Tracer may still expose active span methods.
- Loading branch information
1 parent
d4dfd46
commit 5f70f81
Showing
1 changed file
with
29 additions
and
10 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