skillfed

openinference-instrumentation-bedrock

OpenInference Bedrock Instrumentation

openinference-instrumentation-bedrock v0.1.45 233.9K downloads/30d#9,031 on PyPI1,147
Permissive license Apache-2.0 Active released

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-bedrock

uv

uv add openinference-instrumentation-bedrock

poetry

poetry add openinference-instrumentation-bedrock

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

bedrock tracing instrumentationaws bedrock opentelemetryllm call tracing awsbedrock api monitoringopeninference bedrockaioboto3 instrumentationbedrock observability
aws-bedrockopentelemetryllm-observability

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-botocore

Adds distributed tracing to AWS SDK calls made…

permissive · top 5,000 on PyPI

openinference-instrumentation-anthropic

Automatically captures and exports traces from…

permissive · top 15,000 on PyPI

openinference-instrumentation-claude-agent-sdk

Auto-instruments Claude Agent SDK calls to emit…

permissive · top 15,000 on PyPI

aws_sdk_bedrock_runtime

Provides a Python client for interacting with…

permissive · top 15,000 on PyPI

openinference-instrumentation-litellm

Auto-instruments LiteLLM function calls…

permissive · top 15,000 on PyPI

openinference-instrumentation-openai

Auto-instruments OpenAI Python SDK calls to…

permissive · top 5,000 on PyPI

openinference-instrumentation-mcp

Auto-instruments MCP tool calls to propagate…

permissive · top 15,000 on PyPI

openinference-instrumentation-openai-agents

Auto-instruments OpenAI Agents SDK to emit…

permissive · top 5,000 on PyPI

openinference-instrumentation-agno

Auto-instruments Agno Agent applications to…

permissive · top 15,000 on PyPI

openinference-instrumentation-google-genai

Automatically instruments Google GenAI SDK…

permissive · top 15,000 on PyPI