forked from open-telemetry/opentelemetry-python
-
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.
api: adding trace.get_current_span (open-telemetry#552)
The span context is no longer coupled with the tracer itself. As such, providing a get_current_span method bound to the trace api module rather than a specific tracer is semantically correct, and removes a hurdle where someone who wants to retrieve the current trace would have to create a tracer to do so. renaming and exporting get_span_in_context to get_current_span, as the intention of the API is similar, and reduces unneeded aliasing and duplication. set_span_in_context is not renamed, as set_current_span would have implied that the span would then be active in the default context, which is only true after attaching the resulting context returned by set_span_in_context. Keeping that name at least implies some asymmetric behavior from get_current_span. After discussion in the SIG, we decided to remove the legacy get_current_span APIs from Tracer and TracerProvider to reduce long-term confusion of how to idiomatically retrieve the span. Co-authored-by: alrex <aboten@lightstep.com> Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com> Co-authored-by: Leighton Chen <lechen@microsoft.com> Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com> Co-authored-by: Mauricio Vásquez <mauricio@kinvolk.io> Co-authored-by: Andrew Xue <aaxue@google.com> Co-authored-by: Cheng-Lung Sung <clsung@gmail.com>
- Loading branch information
1 parent
a514d21
commit 0316c1f
Showing
24 changed files
with
522 additions
and
448 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
opentelemetry.trace.span | ||
======================== | ||
|
||
.. automodule:: opentelemetry.trace.span | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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
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
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
Oops, something went wrong.