# Couchbase Client

<!-- llms-txt-link: /llms.txt -->

> OpenTelemetry Java agent instrumentation

This instrumentation enables database client spans and database client metrics for Couchbase 2.6 operations. It automatically traces key-value operations (get, upsert, replace, remove), view queries, N1QL queries, and cluster management operations.

- **Name**: `couchbase-2.6`
- **Scope**: `io.opentelemetry.couchbase-2.6`
- **Target versions**: `com.couchbase.client:java-client:[2.6.0,3)`
- **Library**: https://github.com/couchbase/couchbase-java-client

## Telemetry

- **Metrics**: `db.client.operation.duration`
- **Span attributes**: `db.name`, `db.operation`, `db.statement`, `db.system`, `network.peer.address`, `network.peer.port`, `network.type`, `couchbase.local.address`, `couchbase.operation_id`, `db.namespace`, `db.operation.name`, `db.query.summary`, `db.query.text`, `db.system.name`

## Configuration

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `otel.instrumentation.common.db.query-sanitization.enabled` | boolean | true | Enables query sanitization for database queries. |
| `otel.instrumentation.couchbase.experimental-span-attributes` | boolean | false | Enables experimental span attributes `couchbase.operation_id` and `couchbase.local.address`. Different operation types receive different experimental attributes. |

## Data

- **JSON**: [/data/javaagent/instrumentations/couchbase-2.6/couchbase-2.6-34a111ea55a6.json](/data/javaagent/instrumentations/couchbase-2.6/couchbase-2.6-34a111ea55a6.json)
- **Explore**: [/java-agent/instrumentation/couchbase-2.6](/java-agent/instrumentation/couchbase-2.6)
