Class LocalRootSpan
java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.LocalRootSpan
A local root span is a span that either does not have a parent span (it is the root span of a
trace), or its parent span is a remote span (context was propagated from another application).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.opentelemetry.api.trace.Spancurrent()Returns the local root span from the current context or invalid span if there is no local root span.static io.opentelemetry.api.trace.SpanfromContext(io.opentelemetry.context.Context context) Returns the local root span from the given context or invalid span if there is no local root span in the context.static io.opentelemetry.api.trace.SpanfromContextOrNull(io.opentelemetry.context.Context context) Returns the local root span from the given context ornullif there is no local root span in the context.
-
Constructor Details
-
LocalRootSpan
public LocalRootSpan()
-
-
Method Details
-
current
public static io.opentelemetry.api.trace.Span current()Returns the local root span from the current context or invalid span if there is no local root span. -
fromContext
public static io.opentelemetry.api.trace.Span fromContext(io.opentelemetry.context.Context context) Returns the local root span from the given context or invalid span if there is no local root span in the context. -
fromContextOrNull
@Nullable public static io.opentelemetry.api.trace.Span fromContextOrNull(io.opentelemetry.context.Context context) Returns the local root span from the given context ornullif there is no local root span in the context.
-