Skip to content

fix(formatting): do not hide siblings of nested predefined fields#1187

Merged
pamburus merged 1 commit into
masterfrom
issue/176
Dec 14, 2025
Merged

fix(formatting): do not hide siblings of nested predefined fields#1187
pamburus merged 1 commit into
masterfrom
issue/176

Conversation

@pamburus
Copy link
Copy Markdown
Owner

@pamburus pamburus commented Dec 14, 2025

When a predefined field is configured with a nested path (e.g., span.name), the nested field should be hidden from regular fields output without triggering the ... hidden fields indicator. However, the sibling fields (e.g., span.context) should not be hidden.

Changes:

  • Add nested_field_names() method to PredefinedFields to iterate over nested predefined field paths
  • Build a separate IncludeExcludeKeyFilter for predefined nested fields
  • Add FormatResult enum to distinguish between formatted, hidden by user (shows ...), and hidden by predefined (silent skip)
  • Pass predefined filter to formatter and check it before user filter
  • Roll back empty objects that become empty due to predefined filtering

Additional fix for #176

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.28%. Comparing base (04abba1) to head (35112c9).
⚠️ Report is 77 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1187      +/-   ##
==========================================
+ Coverage   84.12%   84.28%   +0.16%     
==========================================
  Files          47       47              
  Lines        9465     9539      +74     
==========================================
+ Hits         7962     8040      +78     
+ Misses       1503     1499       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pamburus pamburus marked this pull request as ready for review December 14, 2025 23:37
@pamburus pamburus merged commit a6d9619 into master Dec 14, 2025
12 checks passed
@pamburus pamburus deleted the issue/176 branch December 14, 2025 23:37
@pamburus pamburus added the bug Something isn't working label Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant