Package io.opentelemetry.sdk.trace
Class SpanLimits
java.lang.Object
io.opentelemetry.sdk.trace.SpanLimits
Class that holds limits enforced during span recording.
Note: To allow dynamic updates of SpanLimits
you should register a Supplier
with SdkTracerProviderBuilder.setSpanLimits(java.util.function.Supplier)
which supplies dynamic configs when queried.
-
Constructor Summary
ModifierConstructorDescriptionprotected
Deprecated.Will be made package private in 2.0.0. -
Method Summary
Modifier and TypeMethodDescriptionstatic SpanLimitsBuilder
builder()
Returns a newSpanLimitsBuilder
to construct aSpanLimits
.static SpanLimits
Returns the defaultSpanLimits
.int
Returns the max number of characters for string attribute values.abstract int
Returns the max number of attributes perSpan
.abstract int
Returns the max number of attributes per event.abstract int
Returns the max number of attributes per link.abstract int
Returns the max number of events perSpan
.abstract int
Returns the max number of links perSpan
.Returns aSpanLimitsBuilder
initialized to the same property values as the current instance.
-
Constructor Details
-
SpanLimits
Deprecated.Will be made package private in 2.0.0.Create an instance.
-
-
Method Details
-
getDefault
Returns the defaultSpanLimits
. -
builder
Returns a newSpanLimitsBuilder
to construct aSpanLimits
. -
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
Returns aSpanLimitsBuilder
initialized to the same property values as the current instance.- Returns:
- a
SpanLimitsBuilder
initialized to the same property values as the current instance.
-