-
Notifications
You must be signed in to change notification settings - Fork 645
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 basic handling for bedrock invoke.model #3200
botocore: add basic handling for bedrock invoke.model #3200
Conversation
instrumentation/opentelemetry-instrumentation-botocore/tests/conftest.py
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-botocore/tests/conftest.py
Show resolved
Hide resolved
Looks good to me, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
...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
…#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>
…#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>
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.