Package 

Class SpanLink

  • All Implemented Interfaces:
    com.datadog.trace.bootstrap.instrumentation.api.AgentSpanLink

    
    public class SpanLink
     implements AgentSpanLink
                        

    This class is a base implementation of AgentSpanLink.

    • Method Detail

      • from

         static SpanLink from(AgentSpan.Context context)

        Creates a span link from a span context. Gathers the trace and span identifiers from the giveninstance.

        Parameters:
        context - The context of the span to get the link to.
      • from

         static SpanLink from(AgentSpan.Context context, byte traceFlags, String traceState, AgentSpanLink.Attributes attributes)

        Creates a span link from a span context with W3C trace state and custom attributes. Gathers thetrace and span identifiers from the given instance.

        Parameters:
        context - The context of the span to get the link to.
        traceFlags - The W3C formatted trace flags.
        traceState - The W3C formatted trace state.
        attributes - The link attributes.
      • spanId

         long spanId()

        Gets the span identifier of the linked span.

      • traceFlags

         byte traceFlags()

        Gets the 8-bit field that controls tracing flags such as sampling, trace level, etc.

      • traceState

         String traceState()

        Gets the vendor-specific trace information as defined per W3C standard.