Class TraceParams.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setSampler

        public abstract TraceParams.Builder setSampler​(Sampler sampler)
        Sets the global default Sampler. It must be not null otherwise build() will throw an exception.
        Parameters:
        sampler - the global default Sampler.
        Returns:
        this.
        Since:
        0.5
      • setMaxNumberOfAttributes

        public abstract TraceParams.Builder setMaxNumberOfAttributes​(int maxNumberOfAttributes)
        Sets the global default max number of attributes per Span.
        Parameters:
        maxNumberOfAttributes - the global default max number of attributes per Span. It must be positive otherwise build() will throw an exception.
        Returns:
        this.
        Since:
        0.5
      • setMaxNumberOfAnnotations

        public abstract TraceParams.Builder setMaxNumberOfAnnotations​(int maxNumberOfAnnotations)
        Sets the global default max number of Annotation events per Span.
        Parameters:
        maxNumberOfAnnotations - the global default max number of Annotation events per Span. It must be positive otherwise build() will throw an exception.
        Returns:
        this.
        Since:
        0.5
      • setMaxNumberOfMessageEvents

        public abstract TraceParams.Builder setMaxNumberOfMessageEvents​(int maxNumberOfMessageEvents)
        Sets the global default max number of MessageEvent events per Span.
        Parameters:
        maxNumberOfMessageEvents - the global default max number of MessageEvent events per Span. It must be positive otherwise build() will throw an exception.
        Returns:
        this.
        Since:
        0.12
      • setMaxNumberOfLinks

        public abstract TraceParams.Builder setMaxNumberOfLinks​(int maxNumberOfLinks)
        Sets the global default max number of Link entries per Span.
        Parameters:
        maxNumberOfLinks - the global default max number of Link entries per Span. It must be positive otherwise build() will throw an exception.
        Returns:
        this.
        Since:
        0.5
      • build

        public TraceParams build()
        Builds and returns a TraceParams with the desired values.
        Returns:
        a TraceParams with the desired values.
        Throws:
        java.lang.NullPointerException - if the sampler is null.
        java.lang.IllegalArgumentException - if any of the max numbers are not positive.
        Since:
        0.5