Skip to content
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

botocore: add bedrock genai user events and lazy initialize tracer #3258

Merged
merged 8 commits into from
Feb 13, 2025

Conversation

xrmx
Copy link
Contributor

@xrmx xrmx commented Feb 11, 2025

Description

This starts implementing genai events support for botocore's bedrock extension. This only implements the user message as a start because they are common to all the APIs and there's already enough code to review.
This includes code to setup different tracers and event loggers (and so schema versions) depending on the extension.
This also removes the pass of AWS authentication environment variables because of security concerns, instead I've added documentation on how to override the tox configuration when needed for recording calls.

Refs #3210

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox -e py310-test-instrumentation-botocore

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

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

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@xrmx xrmx requested a review from a team as a code owner February 11, 2025 14:52
@codefromthecrypt codefromthecrypt changed the title botocore: add bedrock genai user events botocore: add bedrock genai user events and lazy initialize tracer Feb 12, 2025
Copy link
Contributor

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good I like starting small. despite lazy init being in the same change it makes sense as it shows how it is used as well (for events specifically)

Co-authored-by: Adrian Cole <[email protected]>
@xrmx xrmx added the gen-ai Related to generative AI label Feb 12, 2025
Copy link
Contributor

@karthikscale3 karthikscale3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@xrmx xrmx merged commit 9587360 into open-telemetry:main Feb 13, 2025
694 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gen-ai Related to generative AI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants