Skip to content

[logs] Rename LogRecordProcessor.emit to on_emit #4648

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 4 commits into
base: main
Choose a base branch
from

Conversation

hectorhdzg
Copy link
Member

@hectorhdzg hectorhdzg commented Jun 19, 2025

Description

Rename LogRecordProcessor.emit to on_emit to align with specification
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#onemit

Fixes #4312

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

@hectorhdzg hectorhdzg requested a review from a team as a code owner June 19, 2025 23:15
@tammy-baylis-swi
Copy link
Contributor

Thanks for another one @hectorhdzg ! I think the API should also be updated.

@hectorhdzg
Copy link
Member Author

Thanks for reviewing @tammy-baylis-swi, I looked into the API as well, Logger "emit" is actually the expected method name, on_emit is only applicable to LogRecordProcessors, I could be missing something though.

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.

Logs SDK: consider renaming LogRecordProcessor.emit to on_emit
2 participants