Skip to content

[logs] Rename LogRecordProcessor.emit to on_emit#4648

Merged
lzchen merged 5 commits intoopen-telemetry:mainfrom
hectorhdzg:hectorhdzg/onemit
Jun 26, 2025
Merged

[logs] Rename LogRecordProcessor.emit to on_emit#4648
lzchen merged 5 commits intoopen-telemetry:mainfrom
hectorhdzg:hectorhdzg/onemit

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.

@xrmx xrmx moved this to Ready for review in Python PR digest Jun 23, 2025
@lzchen
Copy link
Contributor

lzchen commented Jun 25, 2025

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.

I believe this is correct.

@lzchen lzchen merged commit 07700dd into open-telemetry:main Jun 26, 2025
449 of 450 checks passed
@github-project-automation github-project-automation bot moved this from Ready for review to Done in Python PR digest Jun 26, 2025
JWinermaSplunk pushed a commit to JWinermaSplunk/opentelemetry-python that referenced this pull request Feb 17, 2026
JWinermaSplunk pushed a commit to JWinermaSplunk/opentelemetry-python that referenced this pull request Feb 17, 2026
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.

Logs SDK: consider renaming LogRecordProcessor.emit to on_emit

4 participants