Interface SpanLinksBuilder


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      SpanLinksBuilder addLink​(io.opentelemetry.api.trace.SpanContext spanContext)
      Adds a link to the newly created Span.
      SpanLinksBuilder addLink​(io.opentelemetry.api.trace.SpanContext spanContext, io.opentelemetry.api.common.Attributes attributes)
      Adds a link to the newly created Span.
    • Method Detail

      • addLink

        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

        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)