Package io.opentelemetry.sdk.internal
Class AttributeUtil
java.lang.Object
io.opentelemetry.sdk.internal.AttributeUtil
This class is internal and is hence not for public use. Its APIs are unstable and can change at
any time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> boolean
static Object
applyAttributeLengthLimit
(Object value, int lengthLimit) Apply thelengthLimit
to the attributevalue
.static Attributes
applyAttributesLimit
(Attributes attributes, int countLimit, int lengthLimit) Apply thecountLimit
andlengthLimit
to the attributes.private static boolean
isValidLength
(Object value, int lengthLimit)
-
Constructor Details
-
AttributeUtil
private AttributeUtil()
-
-
Method Details
-
applyAttributesLimit
public static Attributes applyAttributesLimit(Attributes attributes, int countLimit, int lengthLimit) Apply thecountLimit
andlengthLimit
to the attributes.If all attributes fall within the limits, return as is. Else, return an attributes instance with the limits applied.
countLimit
limits the number of unique attribute keys.lengthLimit
limits the length of attribute string and string list values. -
isValidLength
-
allMatch
-
applyAttributeLengthLimit
Apply thelengthLimit
to the attributevalue
. Strings and strings in lists which exceed the length limit are truncated.
-