Skip to content

Remove events from the API/SDK, an Event is now a LogRecord with the EventName field set #4651

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DylanRussell
Copy link
Contributor

Description

See open-telemetry/opentelemetry-specification#4045 and open-telemetry/opentelemetry-specification#4319 - the event API and SDK are deprecated in the spec.

The only change made to support events is adding the event name field to the LogRecord. If you want to emit an event you can do so using the logging API/SDK using a LogRecord with the event_name field set. This simplifies the code a bunch and aligns python with the spec and what other languages do.

I have another PR (#4645) out to update the proto version ahead of v1.5 which added event_name to the LogRecord, and to add the event_name field to the LogRecord API/SDK.

Type of change

Please delete options that are not relevant.

  • [x ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Unit tests. This change is deleting code only.

Does This PR Require a Contrib Repo Change?

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

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 20, 2025 17:53
@DylanRussell
Copy link
Contributor Author

Ok there are 4 broken instrumentations we have to update first..

First #4645 needs to get submitted, so we can start putting EventName directly into the LogRecord instead of as an attribute.

Then we have to go and update the instrumentations to emit a LogRecord with the event name set instead of using the events API..

Then we can make this change..

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.

1 participant