Repository navigation
Protect scope-owned span attributes - #266
Merged
Radhika Gupta (rads-1996) merged 10 commits intoSep 25, 2026
Merged
Radhika Gupta (rads-1996) merged 10 commits into
Radhika Gupta (rads-1996) merged 10 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Performance comparisonThreshold: regressions >15.0% on gating scenarios fail the build. Higher ops/s is better; positive Δ means the PR is slower.
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Nikhil Navakiran (nikhilNava)
marked this pull request as ready for review
September 25, 2026 18:36
Copilot started reviewing on behalf of
Nikhil Navakiran (nikhilNava)
September 25, 2026 18:36
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Unresolved moderate issues remain in attribute acceptance tracking and compatibility with recording Span implementations.
Review effort: Lite
Findings: None
What changed in this PR
Updates record_attributes() to preserve scope-owned attributes, handle duplicate keys safely, and support non-recording spans.
Changes:
- Adds first-wins attribute filtering and iterable input support.
- Adds regression tests for duplicate and non-recording spans.
- Updates documentation and changelog.
Review findings: key tracking should reflect only accepted attributes, recording spans without .attributes need a fallback, and the docstring should document generic iterables.
| File | Description |
|---|---|
tests/a365/test_opentelemetry_scope.py |
Tests attribute filtering and preservation. |
tests/a365/test_nonrecording_span.py |
Tests safe non-recording behavior. |
src/microsoft/opentelemetry/a365/core/opentelemetry_scope.py |
Implements protected attribute recording. |
CHANGELOG.md |
Documents the fix. |
A365_DOCUMENTATION.md |
Documents record_attributes() behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Radhika Gupta (rads-1996)
approved these changes
Sep 25, 2026
Nikhil Navakiran (nikhilNava)
deleted the
copilot/protected-extra-attributes
branch
September 25, 2026 19:34
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.
Summary
record_attributes()from overwriting semantic attributes already set by a scope or propagated from baggageSpanimplementations without a public.attributespropertyNonRecordingSpanand disabled telemetry paths safePython parity for microsoft/opentelemetry-distro-dotnet#107.
Validation