Skip to content

Differences in Starting Spans #2856

Discussion options

You must be logged in to vote

https://opentelemetry-python.readthedocs.io/en/latest/api/trace.html#opentelemetry.trace.Tracer.start_span

Starts a span.

Create a new span. Start the span without setting it as the current span in the context. To start the span and use the context in a single method, see start_as_current_span().

By default the current span in the context will be used as parent, but an explicit context can also be specified, by passing in a Context containing a current Span. If there is no current span in the global Context or in the specified context, the created span will be a root span.

The span can be used as a context manager. On exiting the context manager, the span’s end() method will be called.

h…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Shackelford-Arden
Comment options

@srikanthccv
Comment options

@Shackelford-Arden
Comment options

Answer selected by Shackelford-Arden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants