Class TraceParams

java.lang.Object
io.opencensus.trace.config.TraceParams
Direct Known Subclasses:
AutoValue_TraceParams

@Immutable public abstract class TraceParams extends Object
Class that holds global trace parameters.
Since:
0.5
  • Field Details

    • DEFAULT_PROBABILITY

      private static final double DEFAULT_PROBABILITY
      See Also:
    • DEFAULT_SAMPLER

      private static final Sampler DEFAULT_SAMPLER
    • DEFAULT_SPAN_MAX_NUM_ATTRIBUTES

      private static final int DEFAULT_SPAN_MAX_NUM_ATTRIBUTES
      See Also:
    • DEFAULT_SPAN_MAX_NUM_ANNOTATIONS

      private static final int DEFAULT_SPAN_MAX_NUM_ANNOTATIONS
      See Also:
    • DEFAULT_SPAN_MAX_NUM_MESSAGE_EVENTS

      private static final int DEFAULT_SPAN_MAX_NUM_MESSAGE_EVENTS
      See Also:
    • DEFAULT

      public static final TraceParams DEFAULT
      Default TraceParams.
      Since:
      0.5
  • Constructor Details

    • TraceParams

      public TraceParams()
  • Method Details

    • getSampler

      public abstract Sampler getSampler()
      Returns the global default Sampler. Used if no Sampler is provided in SpanBuilder.setSampler(Sampler).
      Returns:
      the global default Sampler.
      Since:
      0.5
    • getMaxNumberOfAttributes

      public abstract int getMaxNumberOfAttributes()
      Returns the global default max number of attributes per Span.
      Returns:
      the global default max number of attributes per Span.
      Since:
      0.5
    • getMaxNumberOfAnnotations

      public abstract int getMaxNumberOfAnnotations()
      Returns the global default max number of Annotation events per Span.
      Returns:
      the global default max number of Annotation events per Span.
      Since:
      0.5
    • getMaxNumberOfMessageEvents

      public abstract int getMaxNumberOfMessageEvents()
      Returns the global default max number of MessageEvent events per Span.
      Returns:
      the global default max number of MessageEvent events per Span.
      Since:
      0.12
    • getMaxNumberOfNetworkEvents

      @Deprecated public int getMaxNumberOfNetworkEvents()
      Returns the global default max number of NetworkEvent events per Span.
      Returns:
      the global default max number of NetworkEvent events per Span.
      Since:
      0.5
    • getMaxNumberOfLinks

      public abstract int getMaxNumberOfLinks()
      Returns the global default max number of Link entries per Span.
      Returns:
      the global default max number of Link entries per Span.
      Since:
      0.5
    • builder

      private static TraceParams.Builder builder()
    • toBuilder

      public abstract TraceParams.Builder toBuilder()
      Returns a TraceParams.Builder initialized to the same property values as the current instance.
      Returns:
      a TraceParams.Builder initialized to the same property values as the current instance.
      Since:
      0.5