Skip to content

Fix BoundedAttributes to log drop warning only once per record - #5727

Open
codedbyadiiii wants to merge 3 commits into
open-telemetry:mainfrom
codedbyadiiii:fix-issue-5726
Open

codedbyadiiii wants to merge 3 commits into
open-telemetry:mainfrom
codedbyadiiii:fix-issue-5726

Conversation

@codedbyadiiii

@codedbyadiiii codedbyadiiii commented Oct 2, 2026 •

Copy link
Copy Markdown

Description

Updates BoundedAttributes to log the 'Attributes dict is full' warning only on the first dropped attribute (self.dropped == 0). This reduces excessive log spam when many attributes are dropped, while maintaining an accurate dropped count.

Fixes #5726

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Verified locally with a custom script ensuring that exceeding the BoundedAttributes capacity triggers exactly one warning and accurately tracks the total number of dropped attributes.
  • Ran existing unit tests in test_attributes.py to ensure no regressions.

@codedbyadiiii
codedbyadiiii requested a review from a team as a code owner October 2, 2026 18:47
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on maintainers · refreshed 2026-10-04 19:43 UTC

Merge when ready.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@herin049 herin049 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a changelog fragment.

@codedbyadiiii

Copy link
Copy Markdown
Author

Please add a changelog fragment.

"Added the changelog fragment! Thank you for the review."

@codedbyadiiii
codedbyadiiii requested a review from herin049 October 4, 2026 18:50
Comment thread .changelog/5727.fixed Outdated

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs that need fixes

Development

Successfully merging this pull request may close these issues.

BoundedAttributes logs a warning for every dropped attribute; the spec allows one per record

2 participants