Fix ref_group attribute overrides dropped in span_refinements#1407
Draft
Fix ref_group attribute overrides dropped in span_refinements#1407
Conversation
When a refinement (e.g. span_refinements) had both `extends` and `include_groups` (from ref_group), only the `extends` parent attributes were resolved due to an `else if` that skipped include_groups processing. This change integrates include_groups resolution into the extends block so both are processed together via resolve_inheritance_attrs_unified. Agent-Logs-Url: https://github.com/open-telemetry/weaver/sessions/82815637-bb24-4098-b2cd-f7d3b5ea6e2c Co-authored-by: lmolkova <2347409+lmolkova@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
lmolkova
May 4, 2026 03:38
View session
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1407 +/- ##
=======================================
- Coverage 82.4% 82.4% -0.1%
=======================================
Files 120 120
Lines 10092 10105 +13
=======================================
+ Hits 8320 8327 +7
- Misses 1772 1778 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
span_refinementsusingref_groupto include anattribute_groupsilently drop per-attribute overrides (e.g.note). The same group included from a regularspansentry preserves overrides correctly.Root cause: In
registry.rs,include_groupsresolution was gated behind anelse ifon theextendsbranch. Since refinements always setextends, theirinclude_groups(populated fromref_group) were never processed.Changes:
include_groupsinside theextendsblock and pass all parent attribute sources together toresolve_inheritance_attrs_unified, so both inheritance and group inclusion are resolved in a single passelse ifbranch forinclude_groups(noextends) is unchangedregistry-test-v2-4-refinementsto coverref_groupwith anoteoverride in both a regular span and a span refinement, asserting both resolve identically