opentelemetry-instrumentation-bedrock
OpenTelemetry Bedrock instrumentation
What it is and what it does
This package integrates OpenTelemetry tracing into AWS Bedrock API calls made via Boto3, automatically capturing request and response data as distributed trace spans. It lets you observe what prompts and completions flow through your LLM application, making it easier to debug issues and evaluate output quality.
By default, the instrumentation logs full prompt and completion text to span attributes, which provides visibility but may expose sensitive user data. You can disable this logging by setting the TRACELOOP_TRACE_CONTENT environment variable to false to reduce trace size or protect privacy. The package depends on the OpenTelemetry API, instrumentation framework, and semantic conventions libraries.
Use it for:
- Debug LLM application behavior by inspecting actual prompts and completions sent to Bedrock models.
- Monitor Bedrock API usage patterns and latency across your distributed system using OpenTelemetry exporters.
- Evaluate output quality by correlating trace data with application metrics and user feedback.
- Audit sensitive data flow in production by selectively disabling content logging while keeping call metadata.
- Integrate Bedrock observability into existing OpenTelemetry deployments without additional instrumentation code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds distributed tracing to AWS Bedrock API calls made through Boto3, capturing prompts, completions, and embeddings as span attributes for observability and debugging.
Yes, if you use Bedrock with Boto3 and have an OpenTelemetry deployment in place. The package is actively maintained, has no known vulnerabilities, and low install friction. Be aware that it logs sensitive prompt/completion data by default—set TRACELOOP_TRACE_CONTENT=false if privacy is a concern.
Install
opentelemetry-instrumentation-bedrock on PyPI
pip
pip install opentelemetry-instrumentation-bedrockuv
uv add opentelemetry-instrumentation-bedrockpoetry
poetry add opentelemetry-instrumentation-bedrockInstalling opentelemetry-instrumentation-bedrock
Before you install
Low friction install with four runtime dependencies, all from the OpenTelemetry ecosystem. Active maintenance with a recent release (4 days old) and a well-established repository.
License in practice
Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install opentelemetry-instrumentation-bedrock
from opentelemetry.instrumentation.bedrock import BedrockInstrumentor
BedrockInstrumentor().instrument()
Requires Python 3.10 or later; Boto3 and an OpenTelemetry exporter must be configured separately to send traces.
Verify before relying
- Whether the instrumentation works with all Bedrock model types or only a subset
- Performance overhead of tracing on high-volume Bedrock API calls
- Compatibility with different OpenTelemetry exporters and backends
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions-ai, opentelemetry-semantic-conventions |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,113,843/month — #1,784 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_instrumentation_bedrock-0.62.3-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-langchainAdds distributed tracing to Langchain LLM…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-sagemakerAutomatically captures traces of Amazon…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-mcpAdds distributed tracing to MCP (Model Context…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-botoAdds distributed tracing to AWS SDK (Boto)…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-transformersAdds distributed tracing to HuggingFace…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-ollamaAdds distributed tracing to Ollama Python…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-groqAutomatically captures traces of Groq SDK API…
permissive · top 5,000 on PyPI
aiobotocore-otelAdds distributed tracing to aiobotocore AWS API…
permissive · top 15,000 on PyPI
aws-bedrock-token-generatorGenerates short-term bearer tokens for AWS…
permissive · top 5,000 on PyPI
lumigo-coreProvides core utilities and helpers for…
permissive · top 15,000 on PyPI