Uses of Interface
io.opentelemetry.api.trace.Span
Packages that use Span
Package
Description
API for distributed tracing.
The OpenTelemetry SDK implementation of tracing.
-
Uses of Span in io.opentelemetry.api.incubator.trace
Methods in io.opentelemetry.api.incubator.trace that return SpanMethod parameters in io.opentelemetry.api.incubator.trace with type arguments of type SpanModifier and TypeMethodDescription<T,
E extends Throwable>
TExtendedDefaultTracer.NoopSpanBuilder.startAndCall
(SpanCallable<T, E> spanCallable, BiConsumer<Span, Throwable> handleException) <T,
E extends Throwable>
TExtendedSpanBuilder.startAndCall
(SpanCallable<T, E> spanCallable, BiConsumer<Span, Throwable> handleException) Runs the givenSpanCallable
inside of the span created by the givenSpanBuilder
.<E extends Throwable>
voidExtendedDefaultTracer.NoopSpanBuilder.startAndRun
(SpanRunnable<E> runnable, BiConsumer<Span, Throwable> handleException) <E extends Throwable>
voidExtendedSpanBuilder.startAndRun
(SpanRunnable<E> runnable, BiConsumer<Span, Throwable> handleException) Runs the givenSpanRunnable
inside of the span created by the givenSpanBuilder
. -
Uses of Span in io.opentelemetry.api.trace
Classes in io.opentelemetry.api.trace that implement SpanModifier and TypeClassDescription(package private) final class
The defaultSpan
that is used when noSpan
implementation is available.Fields in io.opentelemetry.api.trace with type parameters of type SpanModifier and TypeFieldDescription(package private) static final ContextKey
<Span> SpanContextKey.KEY
Methods in io.opentelemetry.api.trace that return SpanModifier and TypeMethodDescriptionPropagatedSpan.addEvent
(String name, Attributes attributes) PropagatedSpan.addEvent
(String name, Attributes attributes, long timestamp, TimeUnit unit) default Span
Adds an event to theSpan
.default Span
Adds an event to theSpan
with the giventimestamp
, as nanos since epoch.Span.addEvent
(String name, Attributes attributes) Adds an event to theSpan
with the givenAttributes
.Span.addEvent
(String name, Attributes attributes, long timestamp, TimeUnit unit) default Span
Span.addEvent
(String name, Attributes attributes, Instant timestamp) default Span
Adds an event to theSpan
with the giventimestamp
, as nanos since epoch.default Span
Span.addLink
(SpanContext spanContext) Adds a link to thisSpan
.default Span
Span.addLink
(SpanContext spanContext, Attributes attributes) Adds a link to thisSpan
.(package private) static Span
PropagatedSpan.create
(SpanContext spanContext) static Span
Span.current()
static Span
Span.fromContext
(Context context) static Span
Span.fromContextOrNull
(Context context) static Span
Span.getInvalid()
Returns an invalidSpan
.PropagatedSpan.recordException
(Throwable exception) PropagatedSpan.recordException
(Throwable exception, Attributes additionalAttributes) default Span
Span.recordException
(Throwable exception) Span.recordException
(Throwable exception, Attributes additionalAttributes) PropagatedSpan.setAllAttributes
(Attributes attributes) default Span
Span.setAllAttributes
(Attributes attributes) Sets attributes to theSpan
.<T> Span
PropagatedSpan.setAttribute
(AttributeKey<T> key, T value) PropagatedSpan.setAttribute
(String key, boolean value) PropagatedSpan.setAttribute
(String key, double value) PropagatedSpan.setAttribute
(String key, long value) PropagatedSpan.setAttribute
(String key, String value) default Span
Span.setAttribute
(AttributeKey<Long> key, int value) Sets an attribute to theSpan
.<T> Span
Span.setAttribute
(AttributeKey<T> key, T value) Sets an attribute to theSpan
.default Span
Span.setAttribute
(String key, boolean value) Sets an attribute to theSpan
.default Span
Span.setAttribute
(String key, double value) Sets an attribute to theSpan
.default Span
Span.setAttribute
(String key, long value) Sets an attribute to theSpan
.default Span
Span.setAttribute
(String key, String value) Sets an attribute to theSpan
.PropagatedSpan.setStatus
(StatusCode statusCode) PropagatedSpan.setStatus
(StatusCode statusCode, String description) default Span
Span.setStatus
(StatusCode statusCode) Sets the status to theSpan
.Span.setStatus
(StatusCode statusCode, String description) Sets the status to theSpan
.DefaultTracer.NoopSpanBuilder.startSpan()
SpanBuilder.startSpan()
Starts a newSpan
.PropagatedSpan.updateName
(String name) Span.updateName
(String name) Updates theSpan
name.static Span
Span.wrap
(SpanContext spanContext) Returns a non-recordingSpan
that holds the providedSpanContext
but has no functionality. -
Uses of Span in io.opentelemetry.sdk.trace
Subinterfaces of Span in io.opentelemetry.sdk.traceModifier and TypeInterfaceDescriptioninterface
A combination of the write methods from theSpan
interface and the read methods from theReadableSpan
interface.Classes in io.opentelemetry.sdk.trace that implement SpanModifier and TypeClassDescription(package private) final class
Implementation for theSpan
class that records trace events.Methods in io.opentelemetry.sdk.trace that return SpanModifier and TypeMethodDescriptionSdkSpan.addLink
(SpanContext spanContext, Attributes attributes) SdkSpanBuilder.startSpan()
Methods in io.opentelemetry.sdk.trace with parameters of type SpanModifier and TypeMethodDescriptionprivate static void
SdkSpanBuilder.setSpanError
(Span span, Throwable exception) Marks a span as error.(package private) static SdkSpan
SdkSpan.startSpan
(SpanContext context, String name, InstrumentationScopeInfo instrumentationScopeInfo, SpanKind kind, Span parentSpan, Context parentContext, SpanLimits spanLimits, SpanProcessor spanProcessor, Clock tracerClock, Resource resource, AttributesMap attributes, List<LinkData> links, int totalRecordedLinks, long userStartEpochNanos) Creates and starts a span with the given configuration.Method parameters in io.opentelemetry.sdk.trace with type arguments of type SpanModifier and TypeMethodDescription<T,
E extends Throwable>
TSdkSpanBuilder.startAndCall
(SpanCallable<T, E> spanCallable, BiConsumer<Span, Throwable> handleException) <E extends Throwable>
voidSdkSpanBuilder.startAndRun
(SpanRunnable<E> runnable, BiConsumer<Span, Throwable> handleException)