skillfed

opentelemetry-instrumentation-cassandra

OpenTelemetry Cassandra instrumentation

opentelemetry-instrumentation-cassandra v0.65b0 3.3M downloads/30d#2,677 on PyPI1,086
Permissive license Apache-2.0 Active released

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

uv

uv add opentelemetry-instrumentation-cassandra

poetry

poetry add opentelemetry-instrumentation-cassandra

Installing 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

Development Status :: 4 - BetaIntended 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

cassandra tracing instrumentationopentelemetry cassandra driverdistributed tracing cassandrascylla driver observabilitydatabase query tracingcassandra spans opentelemetrydatabase instrumentation
observabilitycassandradistributed-tracing

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

Adds distributed tracing to Elasticsearch…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-psycopg2

Adds distributed tracing instrumentation to…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-kafka-python

Adds distributed tracing instrumentation to…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-aiokafka

Adds distributed tracing instrumentation to…

permissive · top 5,000 on PyPI

scylla-driver

A Python client library for querying and…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-confluent-kafka

Adds distributed tracing to confluent-kafka…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-sqlalchemy

Adds distributed tracing to SQLAlchemy database…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-psycopg

Adds OpenTelemetry tracing instrumentation to…

permissive · top 5,000 on PyPI

cassandra-driver

A Python client library for Apache Cassandra…

permissive · top 5,000 on PyPI

acsylla

Acsylla is an async Python client library for…

permissive · top 15,000 on PyPI