Skip to content

Add Converse API support. DO NOT MERGE YET #1428

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

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

Conversation

umaannamalai
Copy link
Contributor

This PR adds support for the AWS Bedrock Converse operation.

Copy link

github-actions bot commented Jul 23, 2025

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 6 0 0 0.73s
✅ MARKDOWN markdownlint 7 0 0 0 1.21s
✅ MARKDOWN markdown-link-check 7 0 0 15.95s
❌ PYTHON ruff 925 5 1 0 0.87s
✅ PYTHON ruff-format 925 6 0 0 0.35s
✅ YAML prettier 13 0 0 0 1.35s
✅ YAML v8r 13 0 0 6.09s
✅ YAML yamllint 13 0 0 0.62s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@mergify mergify bot added the tests-failing Tests failing in CI. label Jul 23, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2025

Codecov Report

❌ Patch coverage is 84.00000% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.36%. Comparing base (5661e81) to head (50080ab).

Files with missing lines Patch % Lines
newrelic/hooks/external_botocore.py 82.89% 9 Missing and 4 partials ⚠️
newrelic/hooks/external_aiobotocore.py 87.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1428      +/-   ##
==========================================
+ Coverage   81.33%   81.36%   +0.02%     
==========================================
  Files         208      208              
  Lines       23585    23660      +75     
  Branches     3719     3728       +9     
==========================================
+ Hits        19184    19251      +67     
- Misses       3144     3149       +5     
- Partials     1257     1260       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify mergify bot removed the tests-failing Tests failing in CI. label Jul 23, 2025
@hmstepanek hmstepanek marked this pull request as ready for review July 30, 2025 04:08
@hmstepanek hmstepanek requested a review from a team as a code owner July 30, 2025 04:08
@hmstepanek hmstepanek changed the title Add Converse API support. Add Converse API support. DO NOT MERGE YET Jul 30, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label Jul 30, 2025
Copy link
Contributor

@hmstepanek hmstepanek left a comment

Choose a reason for hiding this comment

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

A couple things that need addressing but overall looks good. I'm going to try to run this manually next week to verify but these are just my thoughts from looking at the code changes.

):
try:
bedrock_attrs = {"model": model, "span_id": span_id, "trace_id": trace_id}
if is_converse:
Copy link
Contributor

Choose a reason for hiding this comment

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

A couple thoughts on the design of this:

I wonder if there's a way you could move this if is_converse block into a request_extractor? Have you explored that at all/do you think that's worth exploring?

OR

Maybe converse should not use this extractor concept at all since it doesn't need to.

Copy link
Contributor

@hmstepanek hmstepanek left a comment

Choose a reason for hiding this comment

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

Just ran this locally and it appears to be behaving as expected so all good from that side of things!

@mergify mergify bot removed the tests-failing Tests failing in CI. label Aug 8, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label Aug 12, 2025
@mergify mergify bot removed the tests-failing Tests failing in CI. label Aug 13, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label Aug 13, 2025
@mergify mergify bot removed the tests-failing Tests failing in CI. label Aug 13, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label Aug 13, 2025
@mergify mergify bot removed the tests-failing Tests failing in CI. label Aug 18, 2025
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