Skip to content

Add event_name as a top level field in the LogRecord. #4652

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

Merged
merged 6 commits into from
Jun 24, 2025

Conversation

DylanRussell
Copy link
Contributor

Description

event_name was added to the log proto as a top level field: https://github.com/open-telemetry/opentelemetry-proto/releases/tag/v1.6.0

We need to wait for #4645 to merge which upgrades the proto in this repo passed 1.5.

Also see open-telemetry/opentelemetry-specification#4260

This PR adds it to the API/SDK / LogRecord -> proto conversion function.

Fixes #4644

Type of change

  • [x ] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Unit tests

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • [ x] No.

Once this PR makes it into a release, I plan to update instrumentations using events to instead use the logs SDK and set this field in the log instead of using the deprecated events SDK.

Checklist:

  • [ x] Followed the style guidelines of this project
  • [ x] Changelogs have been updated
  • [ x] Unit tests have been added
  • [ x] Documentation has been updated

@DylanRussell DylanRussell requested a review from a team as a code owner June 23, 2025 13:53
@DylanRussell DylanRussell mentioned this pull request Jun 23, 2025
1 task
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm. Regarding the @deprecated decorator, that'll be another PR.

@aabmass aabmass enabled auto-merge (squash) June 24, 2025 22:05
@aabmass aabmass merged commit 62112ca into open-telemetry:main Jun 24, 2025
448 of 450 checks passed
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.

Add EventName to LogRecord
3 participants