Interface SpanLinksBuilder


public interface SpanLinksBuilder
A builder that exposes methods for adding links to a span.
  • Method Summary

    Modifier and Type
    Method
    Description
    addLink(io.opentelemetry.api.trace.SpanContext spanContext)
    Adds a link to the newly created Span.
    addLink(io.opentelemetry.api.trace.SpanContext spanContext, io.opentelemetry.api.common.Attributes attributes)
    Adds a link to the newly created Span.
  • Method Details

    • addLink

      @CanIgnoreReturnValue SpanLinksBuilder addLink(io.opentelemetry.api.trace.SpanContext spanContext)
      Adds a link to the newly created Span. Invalid SpanContexts will be skipped.
      Parameters:
      spanContext - the context of the linked Span.
      Returns:
      this.
      See Also:
      • SpanBuilder.addLink(SpanContext)
    • addLink

      @CanIgnoreReturnValue SpanLinksBuilder addLink(io.opentelemetry.api.trace.SpanContext spanContext, io.opentelemetry.api.common.Attributes attributes)
      Adds a link to the newly created Span. Invalid SpanContexts will be skipped.
      Parameters:
      spanContext - the context of the linked Span.
      attributes - the attributes of the Link.
      Returns:
      this.
      See Also:
      • SpanBuilder.addLink(SpanContext)