Enum AlwaysOnSampler

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      INSTANCE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AlwaysOnSampler()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns the description of this Sampler.
      SamplingResult shouldSample​(Context parentContext, java.lang.String traceId, java.lang.String name, SpanKind spanKind, Attributes attributes, java.util.List<LinkData> parentLinks)
      Called during Span creation to make a sampling samplingResult.
      java.lang.String toString()  
      static AlwaysOnSampler valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static AlwaysOnSampler[] 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, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AlwaysOnSampler

        private AlwaysOnSampler()
    • Method Detail

      • values

        public static AlwaysOnSampler[] 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 (AlwaysOnSampler c : AlwaysOnSampler.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AlwaysOnSampler 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
      • shouldSample

        public SamplingResult shouldSample​(Context parentContext,
                                           java.lang.String traceId,
                                           java.lang.String name,
                                           SpanKind spanKind,
                                           Attributes attributes,
                                           java.util.List<LinkData> parentLinks)
        Description copied from interface: Sampler
        Called during Span creation to make a sampling samplingResult.
        Specified by:
        shouldSample in interface Sampler
        Parameters:
        parentContext - the parent span's SpanContext. This can be SpanContext.INVALID if this is a root span.
        traceId - the TraceId for the new Span. This will be identical to that in the parentContext, unless this is a root span.
        name - the name of the new Span.
        spanKind - the SpanKind of the Span.
        attributes - Attributes associated with the span.
        parentLinks - the parentLinks associated with the new Span.
        Returns:
        sampling samplingResult whether span should be sampled or not.
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Sampler
        Returns the description of this Sampler. This may be displayed on debug pages or in the logs.

        Example: "TraceIdRatioBased{0.000100}"

        Specified by:
        getDescription in interface Sampler
        Returns:
        the description of this Sampler.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<AlwaysOnSampler>