botocore: add bedrock genai user events and lazy initialize tracer#3258
Merged
xrmx merged 8 commits intoopen-telemetry:mainfrom Feb 13, 2025
Merged
botocore: add bedrock genai user events and lazy initialize tracer#3258xrmx merged 8 commits intoopen-telemetry:mainfrom
xrmx merged 8 commits intoopen-telemetry:mainfrom
Conversation
xrmx
commented
Feb 11, 2025
...pentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/__init__.py
Show resolved
Hide resolved
codefromthecrypt
approved these changes
Feb 12, 2025
Contributor
codefromthecrypt
left a comment
There was a problem hiding this comment.
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 <64215+codefromthecrypt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.