Enum SamplingDecision

java.lang.Object
java.lang.Enum<SamplingDecision>
io.opentelemetry.sdk.trace.samplers.SamplingDecision
All Implemented Interfaces:
Serializable, Comparable<SamplingDecision>, java.lang.constant.Constable

public enum SamplingDecision extends Enum<SamplingDecision>
A decision on whether a span should be recorded, recorded and sampled or dropped.
  • Enum Constant Details

    • 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 Details

    • values

      public static SamplingDecision[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      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 name
      NullPointerException - if the argument is null