# Couchbase Client

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

> OpenTelemetry Java agent instrumentation

This instrumentation uses the Couchbase tracing SPI to create spans for Couchbase Java SDK 3.0.

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

## Telemetry

### When `default`

**Spans**

| Span kind | Attributes |
| --- | --- |
| INTERNAL | `couchbase.client_context.request_id` (STRING), `couchbase.document_id` (STRING), `couchbase.operation_id` (STRING), `peer.latency` (LONG), `peer.service` (STRING) |

### When `otel.semconv-stability.opt-in=database`

**Spans**

| Span kind | Attributes |
| --- | --- |
| INTERNAL | `couchbase.client_context.request_id` (STRING), `couchbase.document_id` (STRING), `couchbase.operation_id` (STRING), `peer.latency` (LONG), `peer.service` (STRING) |

## Configuration

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `otel.instrumentation.couchbase.emit-experimental-telemetry` | boolean | false | Enables experimental span attributes emitted from the underlying Couchbase library. When v3 preview is enabled, also enables the request_encoding and dispatch_to_server internal spans. |
| `otel.instrumentation.couchbase.experimental-span-attributes` | boolean | false | Deprecated and will be removed in the next minor release. Use otel.instrumentation.couchbase.emit-experimental-telemetry instead. |

## Data

- **JSON (latest)**: [/data/javaagent/instrumentations/couchbase-3.0/latest.json](/data/javaagent/instrumentations/couchbase-3.0/latest.json)
- **JSON (pinned)**: [/data/javaagent/instrumentations/couchbase-3.0/couchbase-3.0-8ad1a59d28a3.json](/data/javaagent/instrumentations/couchbase-3.0/couchbase-3.0-8ad1a59d28a3.json)
- **Explore**: [/java-agent/instrumentation/couchbase-3.0](/java-agent/instrumentation/couchbase-3.0)
