Configuration interface for OpenTelemetry attribute limits.
These limits help control the size and number of attributes to prevent
excessive memory usage and ensure consistent performance.
Example
constlimits: IOTelAttributeLimits = { attributeCountLimit:128, // Maximum 128 attributes attributeValueLengthLimit:4096// Maximum 4KB per attribute value };
Remarks
When limits are exceeded:
Additional attributes beyond attributeCountLimit are dropped
Attribute values longer than attributeValueLengthLimit are truncated
The behavior may vary based on the specific implementation
Maximum allowed length for attribute values in characters.
Remarks
Values longer than this limit will be truncated
Applies to string attribute values only
Numeric and boolean values are not affected by this limit
Array values have this limit applied to each individual element
Default Value
4096
Example
// If attributeValueLengthLimit is 100: span.setAttribute("description", "a".repeat(200)); // Will be truncated to 100 characters span.setAttribute("count", 12345); // Not affected (number) span.setAttribute("enabled", true); // Not affected (boolean)
Configuration interface for OpenTelemetry attribute limits. These limits help control the size and number of attributes to prevent excessive memory usage and ensure consistent performance.
Example
Remarks
When limits are exceeded:
attributeCountLimitare droppedattributeValueLengthLimitare truncatedSince
3.4.0