feat: add support for OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT
User description
Fixes https://github.com/open-telemetry/opentelemetry-rust/discussions/2214
Changes
Add support for the OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT environment variable as explained in Opentelemetry SDK environment variable doc. This will truncate Value::String and Array::String attribute values if they exceed the limit.
- Adds
TracerProviderBuilder::with_max_attribute_value_length()
Merge requirement checklist
- [x] CONTRIBUTING guidelines followed
- [x] Unit tests added/updated (if applicable)
- [x] Appropriate
CHANGELOG.mdfiles updated for non-trivial, user-facing changes - [ ] Changes in public API reviewed (if applicable)
- :x: - login: @msierks-pcln / name: Michael Sierks . The commit (f7dc9cd080079dae475d8b5c4510ec653af95b2b) is not authorized under a signed CLA. Please click here to be authorized. For further assistance with EasyCLA, please submit a support request ticket.
Codecov Report
:x: Patch coverage is 96.07843% with 6 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 80.2%. Comparing base (42139cb) to head (f7dc9cd).
Additional details and impacted files
@@ Coverage Diff @@
## main #3090 +/- ##
=======================================
+ Coverage 80.1% 80.2% +0.1%
=======================================
Files 126 126
Lines 21957 22109 +152
=======================================
+ Hits 17603 17752 +149
- Misses 4354 4357 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@msierks-pcln Can you sign the CLA, so we can consider contributions? It's a one-time process and is mandatory. If contributing on behalf of your employer, please do consult them before signing.
@msierks-pcln Can you sign the CLA, so we can consider contributions? It's a one-time process and is mandatory. If contributing on behalf of your employer, please do consult them before signing.
@cijothomas Yes, I'm working on this with my employer.