Skip to content

fix(appender-tracing): always normalize event metadata when experimental_metadata_attributes is enabled#3582

Open
dquirl-R1 wants to merge 2 commits into
open-telemetry:mainfrom
RedoxOne:fix/appender-meta
Open

fix(appender-tracing): always normalize event metadata when experimental_metadata_attributes is enabled#3582
dquirl-R1 wants to merge 2 commits into
open-telemetry:mainfrom
RedoxOne:fix/appender-meta

Conversation

@dquirl-R1

Copy link
Copy Markdown

Fixes #3543
Design discussion issue (if applicable) #

Changes

Consistently applies NormalizeEvent if the experimental_metadata_attributes feature is active to ensure that the generated log records that are emitted forward the original log.target as the log event target instead of defaulting to "log".

The change impacts all extracted metadata, not just the target. It also applies to

It does not affect the behaviour of EnvFilter, because of the interaction between tracing-log normalizing through AsTrace (a different normalization) before calling enabled on the dispatcher in dispatch_record and the way EnvFilter caches FilterState and doesn't use event_enabled (see also #3543 (comment)).

Note that this reverts #2799 as the optimization is incompatible with applying normalization before setting the target.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@dquirl-R1
dquirl-R1 requested a review from a team as a code owner July 3, 2026 07:36
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.0%. Comparing base (7b24be9) to head (ea66c3a).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-appender-tracing/src/layer.rs 66.6% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3582     +/-   ##
=======================================
- Coverage   83.0%   83.0%   -0.1%     
=======================================
  Files        130     130             
  Lines      28064   28063      -1     
=======================================
- Hits       23321   23320      -1     
  Misses      4743    4743             

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

Copy link
Copy Markdown

Thank you for your contribution! This PR has been automatically marked as stale because it has not had activity in the last 14 days. This may be due to a delay in review on our side or awaiting a response from you; either is fine, and we appreciate your patience.

It will be closed in 14 days if no further activity occurs. Pushing a new commit or leaving a comment will remove the stale label and keep the PR open.

@github-actions github-actions Bot added the Stale label Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Appender-tracing creates log records with the wrong metadata under experimental_span_attributes feature

1 participant