Skip to content

feat(bedrock): trace bedrock runtime calls#519

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-bedrock-integration
Jun 16, 2026
Merged

feat(bedrock): trace bedrock runtime calls#519
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-bedrock-integration

Conversation

@AbhiPrasad

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) commented Jun 16, 2026

Copy link
Copy Markdown
Member

resolves #279

Add a Python Bedrock Runtime integration that auto-instruments boto3/botocore client creation.

import braintrust

braintrust.auto_instrument(bedrock=True)

The integration requires botocore >= 1.34.116, the first supported version whose Bedrock Runtime service model exposes both Converse and ConverseStream. It traces Converse, ConverseStream, InvokeModel, and InvokeModelWithResponseStream with Bedrock-shaped LLM spans.

Manual wrapping is also exposed:

from braintrust.integrations.bedrock_runtime import wrap_bedrock

client = wrap_bedrock(client)
image

Add a Python Bedrock Runtime integration that auto-instruments boto3/botocore client creation. The public auto instrumentation API is:

```python
import braintrust

braintrust.auto_instrument(bedrock=True)
```

The integration requires botocore >= 1.34.116, the first supported version whose Bedrock Runtime service model exposes both Converse and ConverseStream. It traces Converse, ConverseStream, InvokeModel, and InvokeModelWithResponseStream with Bedrock-shaped LLM spans.

Manual wrapping is also exposed for existing clients:

```python
from braintrust.integrations.bedrock_runtime import wrap_bedrock

client = wrap_bedrock(client)
```
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit 15567b7 into main Jun 16, 2026
82 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-bedrock-integration branch June 16, 2026 18:01
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.

Add AWS Bedrock Runtime (boto3) integration for Converse and InvokeModel instrumentation

2 participants