Class ImmutableSamplingResult
java.lang.Object
io.opentelemetry.sdk.trace.samplers.ImmutableSamplingResult
- All Implemented Interfaces:
SamplingResult
- Direct Known Subclasses:
AutoValue_ImmutableSamplingResult
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final SamplingResult
(package private) static final SamplingResult
(package private) static final SamplingResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static SamplingResult
createSamplingResult
(SamplingDecision decision, Attributes attributes) private static SamplingResult
createWithoutAttributes
(SamplingDecision decision) abstract Attributes
Return tags which will be attached to the span.abstract SamplingDecision
Return decision on whether a span should be recorded, recorded and sampled or not recorded.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.opentelemetry.sdk.trace.samplers.SamplingResult
getUpdatedTraceState
-
Field Details
-
EMPTY_RECORDED_AND_SAMPLED_SAMPLING_RESULT
-
EMPTY_NOT_SAMPLED_OR_RECORDED_SAMPLING_RESULT
-
EMPTY_RECORDED_SAMPLING_RESULT
-
-
Constructor Details
-
ImmutableSamplingResult
ImmutableSamplingResult()
-
-
Method Details
-
createSamplingResult
-
createWithoutAttributes
-
getDecision
Description copied from interface:SamplingResult
Return decision on whether a span should be recorded, recorded and sampled or not recorded.- Specified by:
getDecision
in interfaceSamplingResult
- Returns:
- sampling result.
-
getAttributes
Description copied from interface:SamplingResult
Return tags which will be attached to the span.- Specified by:
getAttributes
in interfaceSamplingResult
- Returns:
- attributes added to span. These attributes should be added to the span only when
the sampling decision is
SamplingDecision.RECORD_ONLY
orSamplingDecision.RECORD_AND_SAMPLE
.
-