Skip to content

Update the botocore instrumentation to emit events via the logs API instead of the deprecated events API #3624

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

Conversation

DylanRussell
Copy link

@DylanRussell DylanRussell commented Jul 9, 2025

Description

Move botocore from the deprecated events API to the logs API.

Type of change

Please delete options that are not relevant.

  • [x ] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I've updated the existing unit tests to all pass.

Does This PR Require a Core Repo Change?

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

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • [ 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 July 9, 2025 18:36
@DylanRussell
Copy link
Author

Updated dependencies to require opentelemetry-api >= 1.35, I think this can be merged now.

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.

Thanks and nice to see this moving along

@DylanRussell
Copy link
Author

ACtually before this goes in I think we need to update the SDK Logger to attach the resource to the LogRecord like the SDK EventLogger does: https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py#L654-L764

@tammy-baylis-swi
Copy link
Contributor

ACtually before this goes in I think we need to update the SDK Logger to attach the resource to the LogRecord like the SDK EventLogger does: https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py#L654-L764

Trying to follow. Is this related to Logging SDK vs Events SDK emit to init LogRecord with resource?

@DylanRussell
Copy link
Author

Yes. Event SDK emit adds resource, logging SDK does not. Logging SDK should do it, and there should be no SDK Log record (that's sort of tangentially related, the SDK logger expects an SDK log record when it should expect an API log record which has no resource on it)

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.

4 participants