By default, OpenTelemetry enforces certain limits on attributes - Common specification concepts | OpenTelemetry
-
AttributeCountLimit(Default=128) - Maximum allowed attribute count per record; -
AttributeValueLengthLimit(Default=Infinity) - Maximum allowed attribute value length;
Under some cases, you may find certain attributes are missing in Observe, due to a breach of AttributeCountLimit, or the attribute having a very large value that exceeds Observe’s ingest size limit mentioned in OpenTelemetry - Observability Cloud documentation .
- If you wish to export more than 128 attributes, set the environment variable
OTEL_ATTRIBUTE_COUNT_LIMIT=<YOUR_NEW_LIMIT>on your application - If attribute values are too large:
- You may truncate such attributes at the time of setting them.
- You may also set the environment variable (value denotes number of characters)
OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT=<YOUR_NEW_LIMIT>to automatically truncate any attribute that exceeds the set limit.