Span attributes value length limit ignored for attributes passed to the Span constructor #4416
Labels
bug
Something isn't working
has:reproducer
This bug/feature has a minimal reproducer provided
pkg:sdk-trace-base
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
What happened?
Steps to Reproduce
Install the packages defined in the package.json:
npm i
Run the sample app with script:
npm run startWithEnv
Expected Result
Span has 2 attributes attr1 and attr2 with truncated values "myval"
Actual Result
Span has attr1 attribute with non truncated value "myvalue" and attr2 attribute with truncated value "myval.
Additional Details
Attributes passed to the Span constructor are not truncated with the limit defined by OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT while the attributes passed to span.setAttributes() are. The issue seems to be introduced with the 1.19.0 version of @opentelemetry/sdk-trace-base
OpenTelemetry Setup Code
package.json
Relevant log output
The text was updated successfully, but these errors were encountered: