Skip to content

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

Merged
aabmass merged 6 commits intoopen-telemetry:mainfrom
DylanRussell:add_logname
Jun 24, 2025
Merged

Add event_name as a top level field in the LogRecord.#4652
aabmass merged 6 commits intoopen-telemetry:mainfrom
DylanRussell:add_logname

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
JWinermaSplunk pushed a commit to JWinermaSplunk/opentelemetry-python that referenced this pull request Feb 17, 2026
…etry#4652)

* Initial commit adding event name to the LogRecord

* Update changelog with PR number

* Remove event_name from deprecated initializer overloads..

* remove_pylint

* Add event_name back in some places
JWinermaSplunk pushed a commit to JWinermaSplunk/opentelemetry-python that referenced this pull request Feb 17, 2026
…etry#4652)

* Initial commit adding event name to the LogRecord

* Update changelog with PR number

* Remove event_name from deprecated initializer overloads..

* remove_pylint

* Add event_name back in some places
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add EventName to LogRecord

4 participants