Skip to content

[bot] Add instrumentation for AWS Bedrock Runtime Go SDK (aws-sdk-go-v2/service/bedrockruntime) #60

@braintrust-bot

Description

@braintrust-bot

Summary

The Braintrust Go SDK instruments several major AI provider SDKs (OpenAI, Anthropic, Google GenAI, etc.) but does not instrument the AWS Bedrock Runtime SDK (github.com/aws/aws-sdk-go-v2/service/bedrockruntime). AWS Bedrock is a major cloud gateway to foundation models from Anthropic, Meta, Mistral, Cohere, Amazon, and others, with a well-defined Go execution API in the official AWS SDK.

No other Braintrust SDK (Python, TypeScript, Java, Ruby) has explicit Bedrock Runtime SDK instrumentation either, making this a completely uninstrumented provider across the platform.

What is missing

A trace/contrib/bedrockruntime/ integration module that wraps execution calls on the Bedrock Runtime Go client. The key execution surfaces are:

  • Converse — unified conversational inference across all Bedrock models (consistent message format, tool use support)
  • ConverseStream — streaming variant of Converse
  • InvokeModel — low-level model invocation with model-specific request/response formats
  • InvokeModelWithResponseStream — streaming variant of InvokeModel
  • InvokeModelWithBidirectionalStream — bidirectional streaming for interactive sessions

The AWS SDK uses functional options (func(*Options)) for client configuration, and the client is created via bedrockruntime.NewFromConfig(cfg). Instrumentation could wrap the client or use HTTP middleware on the underlying transport.

Braintrust docs status

Braintrust lists AWS Bedrock as a supported AI provider at the proxy/gateway level, with dedicated documentation for Bedrock configuration, IAM permissions, and regional access. However, there is no SDK-level tracing/instrumentation wrapper for the Bedrock Runtime SDK in any Braintrust SDK. Status: supported at proxy level, not_found for SDK-level instrumentation.

Upstream sources

Braintrust docs sources

Local repo files inspected

  • go.mod — no aws-sdk-go-v2/service/bedrockruntime dependency
  • trace/contrib/ — no bedrockruntime/ or bedrock/ directory exists
  • trace/contrib/all/all.go — no Bedrock import
  • examples/ — no Bedrock example
  • trace/contrib/genai/tracegenai.go — reference pattern for HTTP client wrapping approach

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions