Class TraceConfigBuilder

    • Method Detail

      • setMaxNumberOfAttributes

        public TraceConfigBuilder 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.
      • setMaxNumberOfEvents

        public TraceConfigBuilder setMaxNumberOfEvents​(int maxNumberOfEvents)
        Sets the global default max number of events per Span.
        Parameters:
        maxNumberOfEvents - the global default max number of events per Span. It must be positive otherwise build() will throw an exception.
        Returns:
        this.
      • setMaxNumberOfLinks

        public TraceConfigBuilder setMaxNumberOfLinks​(int maxNumberOfLinks)
        Sets the global default max number of links per Span.
        Parameters:
        maxNumberOfLinks - the global default max number of links per Span. It must be positive otherwise build() will throw an exception.
        Returns:
        this.
      • setMaxNumberOfAttributesPerEvent

        public TraceConfigBuilder setMaxNumberOfAttributesPerEvent​(int maxNumberOfAttributesPerEvent)
        Sets the global default max number of attributes per event.
        Parameters:
        maxNumberOfAttributesPerEvent - the global default max number of attributes per event. It must be positive otherwise build() will throw an exception.
        Returns:
        this.
      • setMaxNumberOfAttributesPerLink

        public TraceConfigBuilder setMaxNumberOfAttributesPerLink​(int maxNumberOfAttributesPerLink)
        Sets the global default max number of attributes per link.
        Parameters:
        maxNumberOfAttributesPerLink - the global default max number of attributes per link. It must be positive otherwise build() will throw an exception.
        Returns:
        this.
      • setMaxLengthOfAttributeValues

        public TraceConfigBuilder setMaxLengthOfAttributeValues​(int maxLengthOfAttributeValues)
        Sets the global default max length of string attribute value in characters.
        Parameters:
        maxLengthOfAttributeValues - the global default max length of string attribute value in characters. It must be non-negative (or TraceConfig.UNLIMITED_ATTRIBUTE_LENGTH) otherwise build() will throw an exception.
        Returns:
        this.
      • build

        public TraceConfig build()
        Builds and returns a TraceConfig with the desired values.
        Returns:
        a TraceConfig with the desired values.
        Throws:
        IllegalArgumentException - if any of the max numbers are not positive.