Interface ExtendedSpan
- All Superinterfaces:
io.opentelemetry.context.ImplicitContextKeyed,io.opentelemetry.api.trace.Span
Span with experimental APIs.-
Method Summary
Modifier and TypeMethodDescriptiondefault io.opentelemetry.api.trace.SpanaddLink(io.opentelemetry.api.trace.SpanContext spanContext) Adds a link to thisSpan.default io.opentelemetry.api.trace.SpanaddLink(io.opentelemetry.api.trace.SpanContext spanContext, io.opentelemetry.api.common.Attributes attributes) Adds a link to thisSpan.Methods inherited from interface io.opentelemetry.context.ImplicitContextKeyed
makeCurrentMethods inherited from interface io.opentelemetry.api.trace.Span
addEvent, addEvent, addEvent, addEvent, addEvent, addEvent, end, end, end, getSpanContext, isRecording, recordException, recordException, setAllAttributes, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setStatus, setStatus, storeInContext, updateName
-
Method Details
-
addLink
default io.opentelemetry.api.trace.Span addLink(io.opentelemetry.api.trace.SpanContext spanContext) Adds a link to thisSpan.Links are used to link
Spans in different traces. Used (for example) in batching operations, where a single batch handler processes multiple requests from different traces or the same trace.Implementations may ignore calls with an invalid span context.
Callers should prefer to add links before starting the span via
SpanBuilder.addLink(SpanContext)if possible.- Parameters:
spanContext- the context of the linkedSpan.- Returns:
- this.
-
addLink
default io.opentelemetry.api.trace.Span addLink(io.opentelemetry.api.trace.SpanContext spanContext, io.opentelemetry.api.common.Attributes attributes) Adds a link to thisSpan.Links are used to link
Spans in different traces. Used (for example) in batching operations, where a single batch handler processes multiple requests from different traces or the same trace.Implementations may ignore calls with an invalid span context.
Callers should prefer to add links before starting the span via
SpanBuilder.addLink(SpanContext, Attributes)if possible.- Parameters:
spanContext- the context of the linkedSpan.attributes- the attributes of theLink.- Returns:
- this.
-