@Immutable public abstract class Link extends Object
Span from a different trace.
Used (for example) in batching operations, where a single batch handler processes multiple requests from different traces.
| Modifier and Type | Method and Description |
|---|---|
static Link |
create(SpanContext context)
Returns a new
Link. |
static Link |
create(SpanContext context,
Map<String,AttributeValue> attributes)
Returns a new
Link. |
abstract Map<String,AttributeValue> |
getAttributes()
Returns the set of attributes.
|
abstract SpanContext |
getContext()
Returns the
TraceId. |
public static Link create(SpanContext context)
Link.context - the context of the linked Span.Link.public static Link create(SpanContext context, Map<String,AttributeValue> attributes)
Link.context - the context of the linked Span.attributes - the attributes of the Link.Link.public abstract SpanContext getContext()
TraceId.TraceId.public abstract Map<String,AttributeValue> getAttributes()