Basic instrumentation for Bedrock runtime Converse api#3161
Basic instrumentation for Bedrock runtime Converse api#3161xrmx merged 8 commits intoopen-telemetry:mainfrom
Conversation
codefromthecrypt
left a comment
There was a problem hiding this comment.
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_modelandconverse - 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.
karthikscale3
left a comment
There was a problem hiding this comment.
Thanks for starting this
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
…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.