Package io.opentelemetry.sdk.trace
Class SpanLimitsBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.trace.SpanLimitsBuilder
-
public final class SpanLimitsBuilder extends java.lang.ObjectBuilder forSpanLimits.
-
-
Field Summary
Fields Modifier and Type Field Description private static intDEFAULT_SPAN_MAX_NUM_ATTRIBUTESprivate static intDEFAULT_SPAN_MAX_NUM_ATTRIBUTES_PER_EVENTprivate static intDEFAULT_SPAN_MAX_NUM_ATTRIBUTES_PER_LINKprivate static intDEFAULT_SPAN_MAX_NUM_EVENTSprivate static intDEFAULT_SPAN_MAX_NUM_LINKSprivate intmaxAttributeValueLengthprivate intmaxNumAttributesprivate intmaxNumAttributesPerEventprivate intmaxNumAttributesPerLinkprivate intmaxNumEventsprivate intmaxNumLinks
-
Constructor Summary
Constructors Constructor Description SpanLimitsBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpanLimitsbuild()Builds and returns aSpanLimitswith the values of this builder.SpanLimitsBuildersetMaxAttributeValueLength(int maxAttributeValueLength)Sets the max number of characters for string attribute values.SpanLimitsBuildersetMaxNumberOfAttributes(int maxNumberOfAttributes)Sets the max number of attributes perSpan.SpanLimitsBuildersetMaxNumberOfAttributesPerEvent(int maxNumberOfAttributesPerEvent)Sets the max number of attributes per event.SpanLimitsBuildersetMaxNumberOfAttributesPerLink(int maxNumberOfAttributesPerLink)Sets the max number of attributes per link.SpanLimitsBuildersetMaxNumberOfEvents(int maxNumberOfEvents)Sets the max number of events perSpan.SpanLimitsBuildersetMaxNumberOfLinks(int maxNumberOfLinks)Sets the max number of links perSpan.
-
-
-
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
-
-
Method Detail
-
setMaxNumberOfAttributes
public SpanLimitsBuilder setMaxNumberOfAttributes(int maxNumberOfAttributes)
Sets the max number of attributes perSpan.- Parameters:
maxNumberOfAttributes- the max number of attributes perSpan. Must be positive.- Returns:
- this.
- Throws:
java.lang.IllegalArgumentException- ifmaxNumberOfAttributesis not positive.
-
setMaxNumberOfEvents
public SpanLimitsBuilder setMaxNumberOfEvents(int maxNumberOfEvents)
Sets the max number of events perSpan.- Parameters:
maxNumberOfEvents- the max number of events perSpan. Must be positive.- Returns:
- this.
- Throws:
java.lang.IllegalArgumentException- ifmaxNumberOfEventsis not positive.
-
setMaxNumberOfLinks
public SpanLimitsBuilder setMaxNumberOfLinks(int maxNumberOfLinks)
Sets the max number of links perSpan.- Parameters:
maxNumberOfLinks- the max number of links perSpan. Must be positive.- Returns:
- this.
- Throws:
java.lang.IllegalArgumentException- ifmaxNumberOfLinksis 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- ifmaxNumberOfAttributesPerEventis 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- ifmaxNumberOfAttributesPerLinkis 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- ifmaxAttributeValueLengthis negative.
-
build
public SpanLimits build()
Builds and returns aSpanLimitswith the values of this builder.
-
-