Package 

Interface SamplingRule


  • 
    public interface SamplingRule
    
                        

    This interface describes the criteria for a sampling rule.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface SamplingRule.TraceSamplingRule

      This interface describes the criteria of a sampling rule that can match against a trace.

      public interface SamplingRule.SpanSamplingRule

      This interface describes the criteria of a sampling rule that can match against a span.

    • Method Summary

      Modifier and Type Method Description
      static String normalizeGlob(String name)
      abstract String getService() Gets the glob pattern the span service must match to validate the rule.
      abstract String getName() Gets the glob pattern the span name must match to validate the rule.
      abstract String getResource() Gets the glob pattern the span resource must match to validate the rule.
      abstract Map<String, String> getTags() Gets the collection of all (tag name, glob pattern) pairs that span tags must match to validatethe rules.
      abstract double getSampleRate() Gets the probability of keeping (sampling) the element matching the rule.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getService

         abstract String getService()

        Gets the glob pattern the span service must match to validate the rule.

      • getName

         abstract String getName()

        Gets the glob pattern the span name must match to validate the rule.

      • getResource

         abstract String getResource()

        Gets the glob pattern the span resource must match to validate the rule.

      • getTags

         abstract Map<String, String> getTags()

        Gets the collection of all (tag name, glob pattern) pairs that span tags must match to validatethe rules. If the collection is empty, the rule will be validated. If the collection hasentries, each key must exactly match a span tag name, and its associated glob pattern mustmatch the span tag value.

      • getSampleRate

         abstract double getSampleRate()

        Gets the probability of keeping (sampling) the element matching the rule.