Package io.opentelemetry.sdk.logs
Class LogLimits
- java.lang.Object
-
- io.opentelemetry.sdk.logs.LogLimits
-
- Direct Known Subclasses:
AutoValue_LogLimits
@Immutable public abstract class LogLimits extends java.lang.Object
Class that holds limits enforced during log recording.Note: To allow dynamic updates of
LogLimits
you should register aSupplier
withSdkLoggerProviderBuilder.setLogLimits(Supplier)
which supplies dynamic configs when queried.- Since:
- 1.27.0
-
-
Constructor Summary
Constructors Constructor Description LogLimits()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static LogLimitsBuilder
builder()
Returns a newLogLimitsBuilder
to construct aLogLimits
.(package private) static LogLimits
create(int maxNumAttributes, int maxAttributeLength)
static LogLimits
getDefault()
Returns the defaultLogLimits
.abstract int
getMaxAttributeValueLength()
Returns the max number of characters for string attribute values.abstract int
getMaxNumberOfAttributes()
Returns the max number of attributes perLogRecordData
.LogLimitsBuilder
toBuilder()
Returns aLogLimitsBuilder
initialized to the same property values as the current instance.
-
-
-
Field Detail
-
DEFAULT
private static final LogLimits DEFAULT
-
-
Method Detail
-
builder
public static LogLimitsBuilder builder()
Returns a newLogLimitsBuilder
to construct aLogLimits
.
-
create
static LogLimits create(int maxNumAttributes, int maxAttributeLength)
-
getMaxNumberOfAttributes
public abstract int getMaxNumberOfAttributes()
Returns the max number of attributes perLogRecordData
.- Returns:
- the max number of attributes per
LogRecordData
.
-
getMaxAttributeValueLength
public abstract 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 LogLimitsBuilder toBuilder()
Returns aLogLimitsBuilder
initialized to the same property values as the current instance.- Returns:
- a
LogLimitsBuilder
initialized to the same property values as the current instance.
-
-