Enum SamplingDecision

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SamplingDecision>

    public enum SamplingDecision
    extends java.lang.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.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SamplingDecision()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SamplingDecision valueOf​(java.lang.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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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.
    • Constructor Detail

      • SamplingDecision

        private SamplingDecision()
    • 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​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null