Package io.opentelemetry.sdk.logs
Class LogLimitsBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.logs.LogLimitsBuilder
-
public final class LogLimitsBuilder extends java.lang.ObjectBuilder forLogLimits.- Since:
- 1.27.0
-
-
Field Summary
Fields Modifier and Type Field Description private static intDEFAULT_LOG_MAX_ATTRIBUTE_LENGTHprivate static intDEFAULT_LOG_MAX_NUM_ATTRIBUTESprivate intmaxAttributeValueLengthprivate intmaxNumAttributes
-
Constructor Summary
Constructors Constructor Description LogLimitsBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LogLimitsbuild()Builds and returns aLogLimitswith the values of this builder.LogLimitsBuildersetMaxAttributeValueLength(int maxAttributeValueLength)Sets the max number of characters for string attribute values.LogLimitsBuildersetMaxNumberOfAttributes(int maxNumberOfAttributes)Sets the max number of attributes perLogRecordData.
-
-
-
Field Detail
-
DEFAULT_LOG_MAX_NUM_ATTRIBUTES
private static final int DEFAULT_LOG_MAX_NUM_ATTRIBUTES
- See Also:
- Constant Field Values
-
DEFAULT_LOG_MAX_ATTRIBUTE_LENGTH
private static final int DEFAULT_LOG_MAX_ATTRIBUTE_LENGTH
- See Also:
- Constant Field Values
-
maxNumAttributes
private int maxNumAttributes
-
maxAttributeValueLength
private int maxAttributeValueLength
-
-
Method Detail
-
setMaxNumberOfAttributes
public LogLimitsBuilder setMaxNumberOfAttributes(int maxNumberOfAttributes)
Sets the max number of attributes perLogRecordData.- Parameters:
maxNumberOfAttributes- the max number of attributes perLogRecordData. Must be positive.- Returns:
- this.
- Throws:
java.lang.IllegalArgumentException- ifmaxNumberOfAttributesis not positive.
-
setMaxAttributeValueLength
public LogLimitsBuilder 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.
-
-