-
Notifications
You must be signed in to change notification settings - Fork 642
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
Basic instrumentation for Bedrock runtime Converse api #3161
Conversation
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 for getting this started, I'm marking approved despite you mentioning that there are some work to backfill here. Mainly, I approve of the direction, and here are my answers to comments you made in the PR desc.
On genai directory or here in boto: agree to do it in boto
Even though there is a "genai" directory, I agree this makes most sense handled as an extension with the rest of the boto instrumentation, especially to avoid problems as genai directory is released independently of the rest of contrib.
On invoke_model
or converse
: do both
It could be best to support both from the start as it is easier to migrate folks that way.
- openinference instruments both
invoke_model
andconverse
- openlit and langtrace instruments
converse
- openllmetry instruments
invoke_model
Basically, we don't want resistance for folks moving to the new canonical instrumentation unless invoke_model
is a dead api.
...ation/opentelemetry-instrumentation-botocore/tests/cassettes/test_converse_with_content.yaml
Show resolved
Hide resolved
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 for starting this
...y-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/__init__.py
Show resolved
Hide resolved
1f63855
to
3b70fd7
Compare
…y#3161) * botocore: add extension for bedrock runtime api * Add tests and handle only non streaming responses * Make it explicit we are handling only the converse operation * Simplify test since all models behaves the same * Add test for error case and rework things a bit * Add converse example * Generate workflows * Add changelog
Description
This is a basic implementation extending the botocore instrumentation with a bedrock-runtime specific extension. This follows genai semconv but is not implementing metrics or events yet.
This is still missing some more tests,
some docs, support for tools, events, metrics and streaming but can be discussed since this would be a genai insrumentation outside instrumentation-genai dir and looking very different than the others.This is a run of the shipped example traced:
Random notes
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.