Package 

Class DDSpanLink

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

    
    public class DDSpanLink
    extends SpanLink
                        

    This class holds helper methods to encode span links into span context.

    • Method Detail

      • from

         static SpanLink from(ExtractedContext context)

        Creates a span link from an ExtractedContext. Gathers the trace and span identifiers,and the W3C trace state from the given instance.

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

         static SpanLink from(ExtractedContext context, AgentSpanLink.Attributes attributes)

        Creates a span link from an ExtractedContext with custom attributes. Gathers the traceand span identifiers, and the W3C trace state from the given instance.

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

         static String toTag(List<AgentSpanLink> links)

        Encode a span link collection into a tag value.

        Parameters:
        links - The span link collection to encode.