Cassandra Driver
OpenTelemetry Java agent instrumentation
This instrumentation enables database client spans and database client metrics for the DataStax Cassandra Driver.
- Name:
cassandra-4.4 - Scope:
io.opentelemetry.cassandra-4.4 - Target versions:
com.datastax.oss:java-driver-core-shaded:[4.4,),com.datastax.oss:java-driver-core:[4.4,),org.apache.cassandra:java-driver-core:(,) - Library: https://github.com/apache/cassandra-java-driver
Telemetry
When default
Spans
| Span kind | Attributes |
|---|---|
| CLIENT | db.cassandra.consistency_level (STRING), db.cassandra.coordinator.dc (STRING), db.cassandra.coordinator.id (STRING), db.cassandra.idempotence (BOOLEAN), db.cassandra.page_size (LONG), db.cassandra.speculative_execution_count (LONG), db.cassandra.table (STRING), db.name (STRING), db.operation (STRING), db.statement (STRING), db.system (STRING), network.peer.address (STRING), network.peer.port (LONG), network.type (STRING), server.address (STRING), server.port (LONG) |
When otel.semconv-stability.opt-in=database
Metrics
| Metric | Instrument | Type | Unit | Description |
|---|---|---|---|---|
db.client.operation.duration | histogram | HISTOGRAM | s | Duration of database client operations. |
| Metric | Attributes |
|---|---|
db.client.operation.duration | db.collection.name (STRING), db.operation.name (STRING), db.query.summary (STRING), db.system.name (STRING), network.peer.address (STRING), network.peer.port (LONG), server.address (STRING), server.port (LONG) |
Spans
| Span kind | Attributes |
|---|---|
| CLIENT | cassandra.consistency.level (STRING), cassandra.coordinator.dc (STRING), cassandra.coordinator.id (STRING), cassandra.page.size (LONG), cassandra.query.idempotent (BOOLEAN), cassandra.speculative_execution.count (LONG), db.collection.name (STRING), db.namespace (STRING), db.operation.batch.size (LONG), db.operation.name (STRING), db.query.summary (STRING), db.query.text (STRING), db.system.name (STRING), network.peer.address (STRING), network.peer.port (LONG), server.address (STRING), server.port (LONG) |
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
java.common.database.statement_sanitizer.enabled | boolean | true | Deprecated: use java.common.db.query_sanitization.enabled instead. It is ignored under v3 preview. |
otel.instrumentation.common.db-statement-sanitizer.enabled | boolean | true | Deprecated: use otel.instrumentation.common.db.query-sanitization.enabled instead. It is ignored under v3 preview and will be removed in 3.0. |
otel.instrumentation.common.db.query-sanitization.enabled | boolean | true | Enables query sanitization for database queries. |
otel.instrumentation.cassandra.query-sanitization.enabled | boolean | Enables query sanitization for Cassandra queries. Overrides otel.instrumentation.common.db.query-sanitization.enabled for this instrumentation; when unset, that setting applies. | |
otel.instrumentation.cassandra.statement-sanitizer.enabled | boolean | Deprecated: use otel.instrumentation.cassandra.query-sanitization.enabled instead. It is ignored under v3 preview and will be removed in 3.0. When unset, this setting falls back to otel.instrumentation.common.db.query-sanitization.enabled (including its deprecated aliases). |