Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

xrmx
Copy link
Contributor

@xrmx xrmx commented Jan 1, 2025

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 and streaming but can be discussed since this would be a genai insrumentation outside instrumentation-genai dir and looking very different than the others.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

  • Test A

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@xrmx xrmx requested a review from a team as a code owner January 1, 2025 18:40
Copy link
Contributor

@codefromthecrypt codefromthecrypt left a 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 and converse
  • 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.

Content-Length:
- '170'
Content-Type:
- !!binary |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm weird... is this due to http/2 or something?

Copy link
Contributor

@karthikscale3 karthikscale3 left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants