openinference-instrumentation-bedrock
OpenInference Bedrock Instrumentation
What it is and what it does
This package automatically captures traces from AWS Bedrock API calls made through boto3 (sync) and aioboto3 (async), converting them into OpenTelemetry spans that conform to the OpenInference specification. It wraps the bedrock-runtime and bedrock-agent-runtime clients to intercept invoke_model, converse, and invoke_agent calls, extracting request and response details without requiring manual instrumentation code.
The traces are exported to any OpenTelemetry-compatible backend where they can be visualized and analyzed. It supports a range of Bedrock models including Anthropic Claude variants, Meta Llama, Amazon Nova, and Mistral models, with different APIs (invoke_model vs. converse) supported depending on the model. The package requires Python 3.10 or later and depends on opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, dacite, wrapt, and typing-extensions.
Use it for:
- Debug and trace LLM calls to Bedrock models by viewing request/response details in observability backends.
- Monitor latency and error rates of Bedrock API calls across your application using OpenTelemetry exporters.
- Instrument async Bedrock workloads built with aioboto3 to correlate LLM calls with application traces.
- Analyze multi-turn conversations with Bedrock's converse API to understand model behavior.
- Integrate Bedrock observability into existing OpenTelemetry pipelines without modifying application code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automatically instruments AWS Bedrock API calls (invoke_model, converse, invoke_agent) made via boto3 and aioboto3 to emit OpenTelemetry traces for observability and debugging.
Yes. The package is actively maintained (release 7 days ago), has no known vulnerabilities, carries a permissive Apache-2.0 license, and solves a real observability gap for Bedrock users. Install friction is low, and it integrates cleanly into existing OpenTelemetry setups. Suitable for production use if you need to trace Bedrock calls.
Install
openinference-instrumentation-bedrock on PyPI
pip
pip install openinference-instrumentation-bedrockuv
uv add openinference-instrumentation-bedrockpoetry
poetry add openinference-instrumentation-bedrockInstalling openinference-instrumentation-bedrock
Before you install
Low friction: pure Python wheel with 8 runtime dependencies including opentelemetry-api, opentelemetry-instrumentation, and wrapt. Actively maintained with a release 7 days ago; repo shows 1147 stars and recent activity.
License in practice
Apache-2.0 permissive license allows use in commercial and private projects with minimal restrictions; attribution required.
Quickstart
pip install openinference-instrumentation-bedrock
from openinference.instrumentation.bedrock import BedrockInstrumentor
from opentelemetry import trace as trace_api
BedrockInstrumentor().instrument()
Requires botocore v1.34.116 or above for converse API support; AWS credentials must be configured separately.
Verify before relying
- Whether all listed Bedrock models are equally well-tested or if some remain experimental.
- Performance overhead of instrumentation on high-throughput workloads.
- Compatibility with custom OpenTelemetry exporters beyond those shown in examples.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — dacite, openinference-instrumentation, openinference-semantic-conventions, opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, typing-extensions, wrapt |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 233,880/month — #9,031 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: openinference_instrumentation_bedrock-0.1.45-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-botocoreAdds distributed tracing to AWS SDK calls made…
permissive · top 5,000 on PyPI
openinference-instrumentation-anthropicAutomatically captures and exports traces from…
permissive · top 15,000 on PyPI
openinference-instrumentation-claude-agent-sdkAuto-instruments Claude Agent SDK calls to emit…
permissive · top 15,000 on PyPI
aws_sdk_bedrock_runtimeProvides a Python client for interacting with…
permissive · top 15,000 on PyPI
openinference-instrumentation-litellmAuto-instruments LiteLLM function calls…
permissive · top 15,000 on PyPI
openinference-instrumentation-openaiAuto-instruments OpenAI Python SDK calls to…
permissive · top 5,000 on PyPI
openinference-instrumentation-mcpAuto-instruments MCP tool calls to propagate…
permissive · top 15,000 on PyPI
openinference-instrumentation-openai-agentsAuto-instruments OpenAI Agents SDK to emit…
permissive · top 5,000 on PyPI
openinference-instrumentation-agnoAuto-instruments Agno Agent applications to…
permissive · top 15,000 on PyPI
openinference-instrumentation-google-genaiAutomatically instruments Google GenAI SDK…
permissive · top 15,000 on PyPI