-
- All Implemented Interfaces:
-
com.datadog.trace.bootstrap.instrumentation.api.AgentSpanLink
public class SpanLink implements AgentSpanLink
This class is a base implementation of AgentSpanLink.
-
-
Method Summary
Modifier and Type Method Description static SpanLinkfrom(AgentSpan.Context context)Creates a span link from a span context. static SpanLinkfrom(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. DDTraceIdtraceId()Gets the trace identifier of the linked span. longspanId()Gets the span identifier of the linked span. bytetraceFlags()Gets the 8-bit field that controls tracing flags such as sampling, trace level, etc. StringtraceState()Gets the vendor-specific trace information as defined per W3C standard. AgentSpanLink.Attributesattributes()Gets the link attributes. StringtoString()-
-
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.
-
attributes
AgentSpanLink.Attributes attributes()
Gets the link attributes.
-
-
-
-