Interface ExtendedSpan

All Superinterfaces:
io.opentelemetry.context.ImplicitContextKeyed, io.opentelemetry.api.trace.Span

public interface ExtendedSpan extends io.opentelemetry.api.trace.Span
Extended Span with experimental APIs.
  • Method Summary

    Modifier and Type
    Method
    Description
    default io.opentelemetry.api.trace.Span
    addLink(io.opentelemetry.api.trace.SpanContext spanContext)
    Adds a link to this Span.
    default io.opentelemetry.api.trace.Span
    addLink(io.opentelemetry.api.trace.SpanContext spanContext, io.opentelemetry.api.common.Attributes attributes)
    Adds a link to this Span.

    Methods inherited from interface io.opentelemetry.context.ImplicitContextKeyed

    makeCurrent

    Methods 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 this Span.

      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 linked Span.
      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 this Span.

      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 linked Span.
      attributes - the attributes of the Link.
      Returns:
      this.