Class SpanLimitsBuilder


  • public final class SpanLimitsBuilder
    extends java.lang.Object
    Builder for SpanLimits.
    • Field Detail

      • DEFAULT_SPAN_MAX_NUM_ATTRIBUTES

        private static final int DEFAULT_SPAN_MAX_NUM_ATTRIBUTES
        See Also:
        Constant Field Values
      • DEFAULT_SPAN_MAX_NUM_EVENTS

        private static final int DEFAULT_SPAN_MAX_NUM_EVENTS
        See Also:
        Constant Field Values
      • DEFAULT_SPAN_MAX_NUM_LINKS

        private static final int DEFAULT_SPAN_MAX_NUM_LINKS
        See Also:
        Constant Field Values
      • DEFAULT_SPAN_MAX_NUM_ATTRIBUTES_PER_EVENT

        private static final int DEFAULT_SPAN_MAX_NUM_ATTRIBUTES_PER_EVENT
        See Also:
        Constant Field Values
      • DEFAULT_SPAN_MAX_NUM_ATTRIBUTES_PER_LINK

        private static final int DEFAULT_SPAN_MAX_NUM_ATTRIBUTES_PER_LINK
        See Also:
        Constant Field Values
      • maxNumAttributes

        private int maxNumAttributes
      • maxNumEvents

        private int maxNumEvents
      • maxNumLinks

        private int maxNumLinks
      • maxNumAttributesPerEvent

        private int maxNumAttributesPerEvent
      • maxNumAttributesPerLink

        private int maxNumAttributesPerLink
      • maxAttributeValueLength

        private int maxAttributeValueLength
    • Constructor Detail

      • SpanLimitsBuilder

        SpanLimitsBuilder()
    • Method Detail

      • setMaxNumberOfAttributes

        public SpanLimitsBuilder setMaxNumberOfAttributes​(int maxNumberOfAttributes)
        Sets the max number of attributes per Span.
        Parameters:
        maxNumberOfAttributes - the max number of attributes per Span. Must be positive.
        Returns:
        this.
        Throws:
        java.lang.IllegalArgumentException - if maxNumberOfAttributes is not positive.
      • setMaxNumberOfEvents

        public SpanLimitsBuilder setMaxNumberOfEvents​(int maxNumberOfEvents)
        Sets the max number of events per Span.
        Parameters:
        maxNumberOfEvents - the max number of events per Span. Must be positive.
        Returns:
        this.
        Throws:
        java.lang.IllegalArgumentException - if maxNumberOfEvents is not positive.
      • setMaxNumberOfLinks

        public SpanLimitsBuilder setMaxNumberOfLinks​(int maxNumberOfLinks)
        Sets the max number of links per Span.
        Parameters:
        maxNumberOfLinks - the max number of links per Span. Must be positive.
        Returns:
        this.
        Throws:
        java.lang.IllegalArgumentException - if maxNumberOfLinks is not positive.
      • setMaxNumberOfAttributesPerEvent

        public SpanLimitsBuilder setMaxNumberOfAttributesPerEvent​(int maxNumberOfAttributesPerEvent)
        Sets the max number of attributes per event.
        Parameters:
        maxNumberOfAttributesPerEvent - the max number of attributes per event. Must be positive.
        Returns:
        this.
        Throws:
        java.lang.IllegalArgumentException - if maxNumberOfAttributesPerEvent is not positive.
      • setMaxNumberOfAttributesPerLink

        public SpanLimitsBuilder setMaxNumberOfAttributesPerLink​(int maxNumberOfAttributesPerLink)
        Sets the max number of attributes per link.
        Parameters:
        maxNumberOfAttributesPerLink - the max number of attributes per link. Must be positive.
        Returns:
        this.
        Throws:
        java.lang.IllegalArgumentException - if maxNumberOfAttributesPerLink is not positive.
      • setMaxAttributeValueLength

        public SpanLimitsBuilder setMaxAttributeValueLength​(int maxAttributeValueLength)
        Sets the max number of characters for string attribute values. For string array attribute values, applies to each entry individually.
        Parameters:
        maxAttributeValueLength - the max number of characters for attribute strings. Must not be negative.
        Returns:
        this.
        Throws:
        java.lang.IllegalArgumentException - if maxAttributeValueLength is negative.
      • build

        public SpanLimits build()
        Builds and returns a SpanLimits with the values of this builder.