Repository navigation
[OpenTelemetry] Release completed log payloads when returning pooled … - #7978
Merged
Merged
Conversation
…records Reset log data, ILogger state, and attribute references when a LogRecord's last owner returns it to a pool. Preserve reusable attribute and scope buffers within their existing size limits. Add regression coverage for exported records, oversized attributes/scopes, thread-static cleanup, and records with an outstanding shared-pool reference. Discovered by Anthropic's OSS Scanner, as bug ANT-2026-PQEVM980.
Pull request dashboard statusMerged · refreshed 2026-10-19 11:49 UTC Status above doesn't look right?
|
Link the SDK changelog entry to PR open-telemetry#7978 for the completed log payload cleanup. Discovered by Anthropic's OSS Scanner, as bug ANT-2026-PQEVM980.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7978 +/- ##
==========================================
+ Coverage 90.14% 90.17% +0.02%
==========================================
Files 365 365
Lines 21428 21431 +3
Branches 3939 3939
==========================================
+ Hits 19316 19325 +9
+ Misses 1532 1525 -7
- Partials 580 581 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Kielek
marked this pull request as ready for review
October 19, 2026 09:09
martincostello
approved these changes
Oct 19, 2026
stevejgordon
approved these changes
Oct 19, 2026
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.
This fix addresses a ANT-2026-PQEVM980 finding from Anthropic's OSS Scanner.
Project enrollment: anthropics/oss-scanner#117.
Changes
Returned
LogRecords retain completed log data, including state and exceptions,until the records are reused. Oversized attribute and scope lists also remain
reachable after their reusable-storage references are dropped.
Reset the payload when either pool returns a record, keeping the existing limits
on reusable buffers and preserving data while a shared-pool reference remains.
Add regression coverage for both pools and independent attribute/scope limits.
This is an ordinary bug fix with no public API changes.
Validation: all seven focused Release/net10.0 cases failed before the fix and
pass after it. The final regressions pass on net10.0, net9.0, net8.0 and net472
(28/28). The full SDK Release test project passes (6,776 passed, 17 skipped), and
the Release solution build passes with zero warnings or errors.
Changed-file formatting checks pass. The full solution formatting command
reports design-time API tracking diagnostics on unchanged APIs and cannot load
some framework names containing whitespace; its exit code is 2. The repository
sanity check passes on an LF-normalized copy of the exact tracked working files;
the Windows checkout itself fails on existing CRLF files and build artifacts.
The SDK changelog entry is prepared and awaits this fix's actual PR URL.
Merge requirement checklist
CHANGELOG.mdfile(s) updated for non-trivial changesNote
This PR description was generated with OpenAI Codex.
Footnotes
Yes, I can answer maintainer questions about the content of this PR without using AI. ↩