OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT
env value ignored with sdk-trace-base package v1.1.0
#3049
Labels
bug
Something isn't working
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
Please answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
What version of Node are you using?
v18
Please provide the code you used to setup the OpenTelemetry SDK
What did you do?
I exported:
export OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT=10
What did you expect to see?
What did you see instead?
As you can see, the
_attributeValueLengthLimit
property in the span is still set toInfinity
andtruncate
has a value longer than 10.Additional context
This issue is happening with v1.1.0 in this package: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base
When I was using @opentelemetry/sdk-node": "0.28.0" and higher, the issue started happening and v28 started using @opentelemetry-sdk-trace-base v1.2.0.
@opentelemetry/sdk-node v0.27.0 was using @opentelemetry-sdk-trace-base v1.1.0 and there was no issue with attribute limit.
There was a change with attribute limits in this pr: #2678 but I haven't looked at it thoroughly to confirm it if this is where the bug is coming from.
To avoid this issue when using @opentelemetry-sdk-trace-base v1.2.0, a user has to set the limit programmatically like so:
The text was updated successfully, but these errors were encountered: