Package io.opentelemetry.sdk.trace
Class SpanLimits
- java.lang.Object
-
- io.opentelemetry.sdk.trace.SpanLimits
-
@Immutable public abstract class SpanLimits extends Object
Class that holds limits enforced during span recording.Note: To allow dynamic updates of
SpanLimits
you should register aSupplier
withSdkTracerProviderBuilder.setSpanLimits(java.util.function.Supplier)
which supplies dynamic configs when queried.
-
-
Constructor Summary
Constructors Constructor Description SpanLimits()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SpanLimitsBuilder
builder()
Returns a newSpanLimitsBuilder
to construct aSpanLimits
.static SpanLimits
getDefault()
Returns the defaultSpanLimits
.abstract int
getMaxNumberOfAttributes()
Returns the global default max number of attributes perSpan
.abstract int
getMaxNumberOfAttributesPerEvent()
Returns the global default max number of attributes per event.abstract int
getMaxNumberOfAttributesPerLink()
Returns the global default max number of attributes per link.abstract int
getMaxNumberOfEvents()
Returns the global default max number of events perSpan
.abstract int
getMaxNumberOfLinks()
Returns the global default max number of links perSpan
.SpanLimitsBuilder
toBuilder()
Returns aSpanLimitsBuilder
initialized to the same property values as the current instance.
-
-
-
Method Detail
-
getDefault
public static SpanLimits getDefault()
Returns the defaultSpanLimits
.
-
builder
public static SpanLimitsBuilder builder()
Returns a newSpanLimitsBuilder
to construct aSpanLimits
.
-
getMaxNumberOfAttributes
public abstract int getMaxNumberOfAttributes()
Returns the global default max number of attributes perSpan
.- Returns:
- the global default max number of attributes per
Span
.
-
getMaxNumberOfEvents
public abstract int getMaxNumberOfEvents()
Returns the global default max number of events perSpan
.- Returns:
- the global default max number of events per
Span
.
-
getMaxNumberOfLinks
public abstract int getMaxNumberOfLinks()
Returns the global default max number of links perSpan
.- Returns:
- the global default max number of links per
Span
.
-
getMaxNumberOfAttributesPerEvent
public abstract int getMaxNumberOfAttributesPerEvent()
Returns the global default max number of attributes per event.- Returns:
- the global default max number of attributes per event.
-
getMaxNumberOfAttributesPerLink
public abstract int getMaxNumberOfAttributesPerLink()
Returns the global default max number of attributes per link.- Returns:
- the global default max number of attributes per link.
-
toBuilder
public SpanLimitsBuilder 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.
-
-