Skip to content

fix(appender-tracing): don't export synthesized event names as EventName - #3798

Open
miton18 wants to merge 1 commit into
open-telemetry:mainfrom
miton18:appender-tracing-synthetic-event-name
Open

miton18 wants to merge 1 commit into
open-telemetry:mainfrom
miton18:appender-tracing-synthetic-event-name

Conversation

@miton18

@miton18 miton18 commented Oct 16, 2026

Copy link
Copy Markdown

Fixes #3797
Design discussion issue (if applicable) #3797

Changes

tracing's event macros name an unnamed event concat!("event ", file!(), ":", line!()). The bridge forwarded that name as the record's EventName, so every plain log was exported as an Event whose "type" is a source location that changes with each edit above the call site.

The bridge now sets EventName only when the name was given explicitly (name: "..."). A name is treated as synthesized iff it equals "event " + meta.file() + ":" + meta.line(). The check is exact, uses the Metadata the bridge already holds, and does not allocate. Logger::event_enabled receives the same Option that gets exported, so None for those records.

  • layer.rs: is_synthesized_event_name, used in on_event. The existing "target, eventname are not explicitly provided" test now asserts that no EventName is set, instead of asserting the synthesized one.
  • lib.rs: the mapping table no longer says every tracing event is an OTel Event.
  • CHANGELOG.md: listed as breaking, since anyone filtering on or reading the synthesized name sees it disappear.

Out of scope, noted in the issue: the fixed "log event" name that tracing-log gives records bridged from the log crate.

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)

tracing names an unnamed event "event <file>:<line>": a source location,
not a class of event. Set EventName only when the name was given
explicitly, so plain logs are no longer exported as Events.

Fixes open-telemetry#3797
@miton18
miton18 requested a review from a team as a code owner October 16, 2026 12:18
@opentelemetry-pr-dashboard

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

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-10-17 01:45 UTC

Investigate required status check failures.

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.
  • Should this be with reviewers? Comment /dashboard route:reviewers to route it to them.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.2%. Comparing base (02b2f15) to head (e2b13c4).

Files with missing lines Patch % Lines
opentelemetry-appender-tracing/src/layer.rs 93.7% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3798     +/-   ##
=======================================
- Coverage   84.2%   84.2%   -0.1%     
=======================================
  Files        123     123             
  Lines      30484   30492      +8     
=======================================
+ Hits       25686   25692      +6     
- Misses      4798    4800      +2     

☔ 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.

@miton18

miton18 commented Oct 16, 2026

Copy link
Copy Markdown
Author

The one red job, test (stable, ubuntu-24.04-arm), fails in opentelemetry-otlp (exporter::tonic::tests::test_gzip_compression_succeeds_with_feature), which this PR does not touch; the other test jobs were cancelled by fail-fast, and main is green. Could a maintainer re-run it? I don't have the rights.

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

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: tracing appender exports the synthesized event <file>:<line> name as EventName

1 participant