Repository navigation
Conversation
Bound attribute nesting at 20 levels and replace cyclic or deeper values with None. Clean top-level attributes independently so invalid values do not discard valid siblings in spans, resources, and metric measurements. Add API, SDK, resource, and measurement regression tests. Fixes open-telemetry#5564 Assisted-by: Kimi
Assisted-by: Kimi
Pull request dashboard statusWaiting on reviewers · refreshed 2026-11-29 05:33 UTC Review the latest changes. Status above doesn't look right?
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #5976. Uses OpenTelemetry's
Assisted-byAI disclosure convention while retainingcsw7777as the sole human commit author.Summary
Fixes #5564.
Noneinstead of leakingRecursionErrorinto application code.Measurementattributes.BoundedAttributes, and metric measurements.This follows the 20-level approach previously reviewed in #5565 and #5757. In particular, it adds the metrics regression coverage requested in #5757 and reapplies the fix onto current
main.Compatibility
Only values that previously caused
RecursionErrorare affected. Valid values at the supported depth remain intact, and valid sibling attributes are preserved. A warning is emitted when a value is replaced withNone.Validation
ruff formatandruff checkon every changed Python file: passed.pylinton every changed Python file: passed, 10.00/10.The focused suites were:
python -m pytest opentelemetry-api/tests/attributes \ opentelemetry-sdk/tests/test_attribute_nesting_depth.py \ opentelemetry-sdk/tests/metrics/test_metrics.py -q -o addopts=""🤖 Generated with Kimi