| Constructor and Description |
|---|
Sampler() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
shouldSample(SpanContext parentContext,
boolean remoteParent,
TraceId traceId,
SpanId spanId,
String name,
List<Span> parentLinks)
Called during
Span creation to make a sampling decision. |
protected abstract boolean shouldSample(@Nullable SpanContext parentContext, boolean remoteParent, TraceId traceId, SpanId spanId, String name, List<Span> parentLinks)
Span creation to make a sampling decision.parentContext - The parent Span SpanContext. May be null if this
is a root span.remoteParent - true if the parentContext is remote.traceId - The TraceId for the new Span. This will be identical to that in
the parentContext, unless this is a root span.spanId - The span ID for the new Span.name - The name of the new Span.parentLinks - The parentLinks associated with the new Span.true if the Span is sampled.