fix(attributes): Per-call attribute pollution in logs and metrics#1879
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1879 +/- ##
==========================================
+ Coverage 75.54% 75.58% +0.03%
==========================================
Files 90 90
Lines 21016 21070 +54
Branches 3730 3745 +15
==========================================
+ Hits 15876 15925 +49
+ Misses 4318 4312 -6
- Partials 822 833 +11 🚀 New features to boost your workflow:
|
jpnurmi
approved these changes
Jul 17, 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.
Fixes per-call attribute pollution when applying attributes with the same key from per-call list and global scope. If the global scope contains an attribute with the same key and additionally specifies
unitfield, theunitwould leak into the telemetry attribute if the per-call one didn't have a unit.By definition, attributes should be merged atomically, so this PR implements a shallow merge that only considers top-level keys in the attributes map.