opentelemetry-instrumentation-botocore
OpenTelemetry Botocore instrumentation
What it is and what it does
This package hooks into botocore and aiobotocore to emit OpenTelemetry spans for every AWS API call your application makes. It integrates with the OpenTelemetry ecosystem—using opentelemetry-api, opentelemetry-instrumentation, and opentelemetry-semantic-conventions—to standardize how AWS request traces are recorded and exported to observability backends.
It includes specialized extensions for several AWS services: DynamoDB, Lambda, SNS, and SQS get automatic semantic enrichment, while Bedrock Runtime gets GenAI semantic conventions for Converse, ConverseStream, InvokeModel, and InvokeModelWithResponseStream calls. The Bedrock extension supports tracing for Amazon Titan, Amazon Nova, and Anthropic Claude models, with tool-call tracing for Nova and Claude 3+. Once installed and activated, instrumentation happens transparently via wrapt.
Use it for:
- Trace all DynamoDB operations in a microservice to identify slow queries or hot partitions in your observability backend.
- Monitor Lambda invocations triggered by your application and correlate them with parent traces across service boundaries.
- Capture SNS/SQS message publish and receive operations to debug asynchronous workflows and message delivery latency.
- Instrument Bedrock API calls to track GenAI model invocations, token usage, and tool calls in a centralized trace store.
- Debug AWS SDK errors and timeouts by examining detailed span attributes and events without modifying application code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds distributed tracing to AWS SDK calls made through botocore and aiobotocore, capturing request/response telemetry for services like DynamoDB, Lambda, SNS, SQS, and Bedrock Runtime.
Yes, if you are already using OpenTelemetry in your application and need to trace AWS SDK calls. The package is actively maintained, has no known vulnerabilities, and integrates cleanly into the OpenTelemetry ecosystem. It is still in beta (0.65b0), so expect occasional API changes; production use is reasonable but monitor release notes. Skip it if you are not using OpenTelemetry or do not need AWS call tracing.
Install
opentelemetry-instrumentation-botocore on PyPI
pip
pip install opentelemetry-instrumentation-botocoreuv
uv add opentelemetry-instrumentation-botocorepoetry
poetry add opentelemetry-instrumentation-botocoreInstalling opentelemetry-instrumentation-botocore
Before you install
Low friction installation with a pure-Python wheel. Actively maintained with a recent release (29 days old) and steady commit activity. Depends on five core OpenTelemetry packages, all standard in the observability ecosystem.
License in practice
Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions; attribution required but no copyleft obligations.
Quickstart
pip install opentelemetry-instrumentation-botocore
from opentelemetry.instrumentation.botocore import BotocoreInstrumentor
BotocoreInstrumentor().instrument()
Requires Python 3.10 or later; assumes an active OpenTelemetry tracer provider is configured in your application.
Verify before relying
- Whether Bedrock tracing metrics/events work for all model families or only the explicitly listed subset (Titan, Nova, Claude).
- Whether tool-call tracing for InvokeModel APIs extends to models beyond Nova and Claude 3+.
- Performance overhead of instrumentation on high-volume AWS SDK call workloads.
- Compatibility with aiobotocore async workflows and any async-specific tracing behavior.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-propagator-aws-xray, opentelemetry-semantic-conventions, wrapt |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 13,315,583/month — #1,288 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_instrumentation_botocore-0.65b0-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
aiobotocore-otelAdds distributed tracing to aiobotocore AWS API…
permissive · top 15,000 on PyPI
openinference-instrumentation-bedrockAutomatically instruments AWS Bedrock API calls…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-boto3sqsAdds distributed tracing to Boto3 SQS calls via…
permissive · top 5,000 on PyPI
aiomotoProvides async-compatible AWS service mocks for…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-botoAdds distributed tracing to AWS SDK (Boto)…
permissive · top 5,000 on PyPI
kedro-telemetryKedro-Telemetry is a plugin that collects…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-aio-pikaAdds distributed tracing instrumentation to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-elasticsearchAdds distributed tracing to Elasticsearch…
permissive · top 5,000 on PyPI
aws-xray-sdkRecords and sends trace data from Python…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-aiokafkaAdds distributed tracing instrumentation to…
permissive · top 5,000 on PyPI