opentelemetry-instrumentation-cassandra
OpenTelemetry Cassandra instrumentation
What it is and what it does
This package integrates OpenTelemetry tracing into Cassandra and Scylla database drivers, automatically wrapping database operations to emit distributed traces. It sits between your application and the cassandra-driver or scylla-driver libraries, capturing query execution as spans that can be exported to observability backends (Jaeger, Datadog, etc.). The instrumentation is part of the OpenTelemetry Python contrib ecosystem and follows the same patterns as other database instrumentors in that suite.
You install it alongside your existing Cassandra driver, then call the instrumentor to activate automatic span generation. It depends on the core OpenTelemetry packages (opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions) and the wrapt library for wrapping. The package is in beta (version 0.65b0) and requires Python 3.10 or later.
Use it for:
- Trace Cassandra query latency and errors across distributed systems to identify database bottlenecks.
- Correlate database operations with application logs and metrics using OpenTelemetry's trace context propagation.
- Monitor Scylla driver performance in production by exporting spans to a tracing backend.
- Debug slow queries by examining span details and timing within your observability platform.
- Build service dependency graphs that include Cassandra as a node in your distributed system.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds distributed tracing instrumentation to Cassandra and Scylla database drivers, capturing queries and operations as OpenTelemetry spans for observability.
Yes, if you are already using OpenTelemetry in your application and need visibility into Cassandra or Scylla operations. The package is actively maintained, has low install friction, and carries no known vulnerabilities. The beta version status warrants checking release notes before upgrading in production, but the core OpenTelemetry ecosystem is stable. Install it if observability of your database layer is a priority.
Install
opentelemetry-instrumentation-cassandra on PyPI
pip
pip install opentelemetry-instrumentation-cassandrauv
uv add opentelemetry-instrumentation-cassandrapoetry
poetry add opentelemetry-instrumentation-cassandraInstalling opentelemetry-instrumentation-cassandra
Before you install
Low install friction with a pure-Python wheel. Actively maintained as of 2026-07-16, with recent activity. Depends on four stable OpenTelemetry core packages (opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, wrapt).
License in practice
Licensed under Apache-2.0 (permissive), allowing use in most commercial and open-source projects without significant restriction.
Quickstart
pip install opentelemetry-instrumentation-cassandra
from opentelemetry.instrumentation.cassandra import CassandraInstrumentor
CassandraInstrumentor().instrument()
Requires Python 3.10 or later. Requires an active OpenTelemetry SDK and exporter configured in your application to actually export the traces.
Verify before relying
- Whether this package auto-instruments existing Cassandra/Scylla driver instances or requires explicit setup per connection.
- What specific span attributes and metrics are captured for Cassandra queries.
- Whether the beta status (0.65b0) indicates API stability or ongoing breaking changes.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, wrapt |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,278,132/month — #2,677 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_instrumentation_cassandra-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
opentelemetry-instrumentation-elasticsearchAdds distributed tracing to Elasticsearch…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-psycopg2Adds distributed tracing instrumentation to…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-kafka-pythonAdds distributed tracing instrumentation to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-aiokafkaAdds distributed tracing instrumentation to…
permissive · top 5,000 on PyPI
scylla-driverA Python client library for querying and…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-confluent-kafkaAdds distributed tracing to confluent-kafka…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-sqlalchemyAdds distributed tracing to SQLAlchemy database…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-psycopgAdds OpenTelemetry tracing instrumentation to…
permissive · top 5,000 on PyPI
cassandra-driverA Python client library for Apache Cassandra…
permissive · top 5,000 on PyPI
acsyllaAcsylla is an async Python client library for…
permissive · top 15,000 on PyPI