botocore: add basic handling for bedrock invoke.model#3200
Merged
xrmx merged 5 commits intoopen-telemetry:mainfrom Jan 23, 2025
Merged
botocore: add basic handling for bedrock invoke.model#3200xrmx merged 5 commits intoopen-telemetry:mainfrom
xrmx merged 5 commits intoopen-telemetry:mainfrom
Conversation
xrmx
commented
Jan 22, 2025
instrumentation/opentelemetry-instrumentation-botocore/tests/conftest.py
Show resolved
Hide resolved
xrmx
commented
Jan 22, 2025
instrumentation/opentelemetry-instrumentation-botocore/tests/conftest.py
Show resolved
Hide resolved
karthikscale3
approved these changes
Jan 22, 2025
Contributor
|
Looks good to me, thanks |
codefromthecrypt
approved these changes
Jan 23, 2025
Contributor
codefromthecrypt
left a comment
There was a problem hiding this comment.
thanks and appreciate you taking the time to hit the branching based on models. While IIUC, the converse API doesn't have this issue, langchain etc want invoke_model. So, it is a good idea to have this here and doing the non-streaming variants first makes it a lot easier to review.
aabmass
approved these changes
Jan 23, 2025
...ry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock.py
Outdated
Show resolved
Hide resolved
...ry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock.py
Outdated
Show resolved
Hide resolved
xrmx
added a commit
to xrmx/opentelemetry-python-contrib
that referenced
this pull request
Jan 24, 2025
…#3200) * Add basic handling for invoke.model * Add changelog a please pylint * Record converse cassettes against us-east-1 * Avoid double copy of streaming body --------- Co-authored-by: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
18 tasks
aryabharat
pushed a commit
to aryabharat/opentelemetry-python-contrib
that referenced
this pull request
Feb 2, 2025
…#3200) * Add basic handling for invoke.model * Add changelog a please pylint * Record converse cassettes against us-east-1 * Avoid double copy of streaming body --------- 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
Handle the invokeModel operation in the bedrock extension of the botocore instrumentation for a bunch of models from Amazon and Anthropic. The API changes between models and so we need custom code for each model 😭 . We are tracing a bunch of request and response params that are available in all models. Next batch of changes will add tracing for the streaming versions of the Converse and InvokeModel.
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.