Enum SamplingDecision
- java.lang.Object
-
- java.lang.Enum<SamplingDecision>
-
- io.opentelemetry.sdk.trace.samplers.SamplingDecision
-
- All Implemented Interfaces:
Serializable
,Comparable<SamplingDecision>
public enum SamplingDecision extends Enum<SamplingDecision>
A decision on whether a span should be recorded, recorded and sampled or dropped.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DROP
Span is dropped.RECORD_AND_SAMPLE
Span is recorded and sampled.RECORD_ONLY
Span is recorded only.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SamplingDecision
valueOf(String name)
Returns the enum constant of this type with the specified name.static SamplingDecision[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DROP
public static final SamplingDecision DROP
Span is dropped. The resulting span will be completely no-op.
-
RECORD_ONLY
public static final SamplingDecision RECORD_ONLY
Span is recorded only. The resulting span will record all information like timings and attributes but will not be exported. Downstream parent-based samplers will not sample the span.
-
RECORD_AND_SAMPLE
public static final SamplingDecision RECORD_AND_SAMPLE
Span is recorded and sampled. The resulting span will record all information like timings and attributes and will be exported.
-
-
Method Detail
-
values
public static SamplingDecision[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SamplingDecision c : SamplingDecision.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SamplingDecision valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-