Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[elasticsearchexporter] Handle new top-level event name field #37011

Open
felixbarny opened this issue Jan 2, 2025 · 2 comments · May be fixed by #37012
Open

[elasticsearchexporter] Handle new top-level event name field #37011

felixbarny opened this issue Jan 2, 2025 · 2 comments · May be fixed by #37012
Labels

Comments

@felixbarny
Copy link
Contributor

Component(s)

exporter/elasticsearch

Is your feature request related to a problem? Please describe.

In open-telemetry/opentelemetry-specification#4260, a new top-level field for EventName has been added to log records. This is set to replace the usage of the event.name attribute, which is now deprecated.

The Elasticsearch exporter should have support for the top-level EventName field.

Describe the solution you'd like

  • Serialize LogRecord.EventName as top-level event_name field in OTel mode
  • Use attributues["event.name"] as a fallback for event_name, so that consumers (like the UI) can start relying on that field, even if the instrumentations haven't been adapted to use the new field, yet.
  • For span events, use event_name in addition to, or instead of attributes.event.name.

Describe alternatives you've considered

We could rely on pre-processing to apply the fallback logic based on the event.name attribute. However, consumers don't have a guarantee over which field is used, as it depends on user configuration.

Additional context

No response

@felixbarny felixbarny added enhancement New feature or request needs triage New item requiring triage labels Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@carsonip
Copy link
Contributor

carsonip commented Jan 2, 2025

/label -needs-triage

@github-actions github-actions bot removed the needs triage New item requiring triage label Jan 2, 2025
@felixbarny felixbarny linked a pull request Jan 2, 2025 that will close this issue
@felixbarny felixbarny changed the title Handle new top-level event name field [elasticsearchexporter] Handle new top-level event name field Jan 2, 2025
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 a pull request may close this issue.

2 participants