Package io.opentelemetry.sdk.trace
Class SpanLimits
- java.lang.Object
-
- io.opentelemetry.sdk.trace.SpanLimits
-
- Direct Known Subclasses:
SpanLimits.SpanLimitsValue
public abstract class SpanLimits extends java.lang.ObjectClass that holds limits enforced during span recording.Note: To allow dynamic updates of
SpanLimitsyou should register aSupplierwithSdkTracerProviderBuilder.setSpanLimits(java.util.function.Supplier)which supplies dynamic configs when queried.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classSpanLimits.SpanLimitsValue
-
Field Summary
Fields Modifier and Type Field Description private static SpanLimitsDEFAULT(package private) static intDEFAULT_SPAN_MAX_ATTRIBUTE_LENGTH
-
Constructor Summary
Constructors Modifier Constructor Description protectedSpanLimits()Deprecated.Will be made package private in 2.0.0.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SpanLimitsBuilderbuilder()Returns a newSpanLimitsBuilderto construct aSpanLimits.(package private) static SpanLimitscreate(int maxNumAttributes, int maxNumEvents, int maxNumLinks, int maxNumAttributesPerEvent, int maxNumAttributesPerLink, int maxAttributeLength)static SpanLimitsgetDefault()Returns the defaultSpanLimits.intgetMaxAttributeValueLength()Returns the max number of characters for string attribute values.abstract intgetMaxNumberOfAttributes()Returns the max number of attributes perSpan.abstract intgetMaxNumberOfAttributesPerEvent()Returns the max number of attributes per event.abstract intgetMaxNumberOfAttributesPerLink()Returns the max number of attributes per link.abstract intgetMaxNumberOfEvents()Returns the max number of events perSpan.abstract intgetMaxNumberOfLinks()Returns the max number of links perSpan.SpanLimitsBuildertoBuilder()Returns aSpanLimitsBuilderinitialized to the same property values as the current instance.
-
-
-
Field Detail
-
DEFAULT_SPAN_MAX_ATTRIBUTE_LENGTH
static final int DEFAULT_SPAN_MAX_ATTRIBUTE_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT
private static final SpanLimits DEFAULT
-
-
Method Detail
-
getDefault
public static SpanLimits getDefault()
Returns the defaultSpanLimits.
-
builder
public static SpanLimitsBuilder builder()
Returns a newSpanLimitsBuilderto construct aSpanLimits.
-
create
static SpanLimits create(int maxNumAttributes, int maxNumEvents, int maxNumLinks, int maxNumAttributesPerEvent, int maxNumAttributesPerLink, int maxAttributeLength)
-
getMaxNumberOfAttributes
public abstract int getMaxNumberOfAttributes()
Returns the max number of attributes perSpan.- Returns:
- the max number of attributes per
Span.
-
getMaxNumberOfEvents
public abstract int getMaxNumberOfEvents()
Returns the max number of events perSpan.- Returns:
- the max number of events per
Span.
-
getMaxNumberOfLinks
public abstract int getMaxNumberOfLinks()
Returns the max number of links perSpan.- Returns:
- the max number of links per
Span.
-
getMaxNumberOfAttributesPerEvent
public abstract int getMaxNumberOfAttributesPerEvent()
Returns the max number of attributes per event.- Returns:
- the max number of attributes per event.
-
getMaxNumberOfAttributesPerLink
public abstract int getMaxNumberOfAttributesPerLink()
Returns the max number of attributes per link.- Returns:
- the max number of attributes per link.
-
getMaxAttributeValueLength
public int getMaxAttributeValueLength()
Returns the max number of characters for string attribute values. For string array attribute values, applies to each entry individually.- Returns:
- the max number of characters for attribute strings.
-
toBuilder
public SpanLimitsBuilder toBuilder()
Returns aSpanLimitsBuilderinitialized to the same property values as the current instance.- Returns:
- a
SpanLimitsBuilderinitialized to the same property values as the current instance.
-
-