Package io.opentelemetry.sdk.logs
Class LogLimitsBuilder
java.lang.Object
io.opentelemetry.sdk.logs.LogLimitsBuilder
Builder for
LogLimits
.- Since:
- 1.27.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds and returns aLogLimits
with the values of this builder.setMaxAttributeValueLength
(int maxAttributeValueLength) Sets the max number of characters for string attribute values.setMaxNumberOfAttributes
(int maxNumberOfAttributes) Sets the max number of attributes perLogRecordData
.
-
Field Details
-
DEFAULT_LOG_MAX_NUM_ATTRIBUTES
private static final int DEFAULT_LOG_MAX_NUM_ATTRIBUTES- See Also:
-
DEFAULT_LOG_MAX_ATTRIBUTE_LENGTH
private static final int DEFAULT_LOG_MAX_ATTRIBUTE_LENGTH- See Also:
-
maxNumAttributes
private int maxNumAttributes -
maxAttributeValueLength
private int maxAttributeValueLength
-
-
Constructor Details
-
LogLimitsBuilder
LogLimitsBuilder()
-
-
Method Details
-
setMaxNumberOfAttributes
Sets the max number of attributes perLogRecordData
.- Parameters:
maxNumberOfAttributes
- the max number of attributes perLogRecordData
. Must be positive.- Returns:
- this.
- Throws:
IllegalArgumentException
- ifmaxNumberOfAttributes
is not positive.
-
setMaxAttributeValueLength
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:
IllegalArgumentException
- ifmaxAttributeValueLength
is negative.
-
build
Builds and returns aLogLimits
with the values of this builder.
-