Skip to main content
To trace AWS Bedrock with HoneyHive, install honeyhive[openinference-aws-bedrock], call HoneyHiveTracer.init(), run BedrockInstrumentor().instrument(tracer_provider=tracer.provider), and use your existing Bedrock code unchanged. See the tracing quickstart and tracer initialization guides for setup details. AWS Bedrock provides access to foundation models from Anthropic, Meta, Mistral, Amazon, and more. HoneyHive integrates with Bedrock via the OpenInference instrumentor, automatically capturing all model invocations and Converse API calls.

How do I trace AWS Bedrock with HoneyHive?

Add HoneyHive tracing in just 4 lines of code. Add this to your existing Bedrock app and all model invocations, Converse API calls, and streaming are automatically traced.
To see where to initialize the tracer for your environment, including AWS Lambda and long-running servers, see Tracer Initialization.

Tested Versions

HoneyHive’s Bedrock integration is tested against the following versions on PyPI, as of April 2026. Newer patch releases are generally safe; if you hit an issue, pin to these versions to reproduce a known-good configuration. Requires Python 3.11+.

What Gets Traced

The instrumentor automatically captures:
  • Model invocations - bedrock.invoke_model() with inputs and outputs
  • Converse API - bedrock.converse() with messages, tool use, and token usage
  • Streaming - bedrock.invoke_model_with_response_stream() and converse_stream()
No manual instrumentation required.

Example: Converse API

Use cross-region inference profiles for newer Anthropic models in us-east-1 and us-west-2. Prefix the model ID with us. (e.g. us.anthropic.claude-haiku-4-5-20251001-v1:0) to enable on-demand throughput via cross-region routing. Older model IDs without the prefix may trigger a ResourceNotFoundException — see Troubleshooting below.

Example: Multi-Turn Conversation


Environment Configuration


Troubleshooting

Traces not appearing

  1. Check environment variables - Ensure HH_API_KEY is set
  2. Pass the tracer provider - The instrumentor must receive tracer_provider=tracer.provider:
  1. Initialize before creating the client - Call instrument() before creating the boto3 Bedrock client

ResourceNotFoundException: Legacy model

If you see ResourceNotFoundException: Access denied. This Model is marked by provider as Legacy, the model has been deprecated by its provider on Bedrock. Switch to a supported model using a cross-region inference profile:

Region configuration

Bedrock is available in specific AWS regions. Make sure your region has Bedrock enabled and the model you’re using is available there:

Anthropic Integration

Direct Anthropic API integration (without Bedrock)

AWS Strands Integration

Agent framework built on Bedrock

Enrich Your Traces

Add user IDs and custom metadata to traces

Distributed Tracing

Trace calls across service boundaries

Using Traceloop (OpenLLMetry) Instead

If your project already uses Traceloop / OpenLLMetry, you can use its Bedrock instrumentor instead of OpenInference. The setup is identical - only the install and import paths differ.
Tested version: opentelemetry-instrumentation-bedrock 0.59.0 (April 2026).

Resources