Skip to content

Add Couchbase 3.x stable db semconv support#18926

Merged
trask merged 10 commits into
open-telemetry:mainfrom
trask:couchbase-3x-stable-db
Jun 9, 2026
Merged

Add Couchbase 3.x stable db semconv support#18926
trask merged 10 commits into
open-telemetry:mainfrom
trask:couchbase-3x-stable-db

Conversation

@trask

@trask trask commented Jun 7, 2026

Copy link
Copy Markdown
Member

Missed this before because it relies on the upstream library instrumentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds stable database semantic conventions support for Couchbase Java Client 3.x javaagent instrumentation by wrapping Couchbase’s upstream OpenTelemetry request tracer and translating deprecated DB semconv attribute keys to their stable equivalents.

Changes:

  • Introduces CouchbaseRequestTracer wrappers for Couchbase 3.1 / 3.1.6 / 3.2 / 3.4 to translate old DB semconv keys to stable DB semconv keys (and optionally pass through Couchbase-specific attributes).
  • Strengthens Couchbase 3.x javaagent tests to assert stable DB semconv behavior, including an additional “stable semconv + experimental Couchbase attributes” test task.
  • Adds config documentation/metadata for Couchbase 3.x and extends CI instrumentation task coverage to run the new test tasks.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/db/SemconvStabilityUtil.java Extends old→stable DB attribute-key mapping used by tests to include Couchbase collection key.
instrumentation/couchbase/README.md Updates Couchbase instrumentation config documentation.
instrumentation/couchbase/couchbase-3.4/metadata.yaml Adds documented configuration for Couchbase 3.4 instrumentation.
instrumentation/couchbase/couchbase-3.4/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_4/CouchbaseClient34Test.java Adds stable DB semconv attribute assertions for Couchbase 3.4.
instrumentation/couchbase/couchbase-3.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_4/CouchbaseRequestTracer.java New wrapper tracer that translates old DB semconv attributes to stable DB semconv.
instrumentation/couchbase/couchbase-3.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_4/CouchbaseEnvironmentInstrumentation.java Switches environment instrumentation to install the new wrapper tracer.
instrumentation/couchbase/couchbase-3.4/javaagent/build.gradle.kts Adds an additional stable-semconv test task enabling Couchbase experimental attributes and wires it into check.
instrumentation/couchbase/couchbase-3.2/metadata.yaml Adds documented configuration for Couchbase 3.2 instrumentation.
instrumentation/couchbase/couchbase-3.2/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_2/CouchbaseClient32Test.java Adds stable DB semconv attribute assertions for Couchbase 3.2.
instrumentation/couchbase/couchbase-3.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_2/CouchbaseRequestTracer.java New wrapper tracer that translates old DB semconv attributes to stable DB semconv.
instrumentation/couchbase/couchbase-3.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_2/CouchbaseEnvironmentInstrumentation.java Switches environment instrumentation to install the new wrapper tracer.
instrumentation/couchbase/couchbase-3.2/javaagent/build.gradle.kts Adds an additional stable-semconv test task enabling Couchbase experimental attributes and wires it into check.
instrumentation/couchbase/couchbase-3.1/metadata.yaml Adds documented configuration for Couchbase 3.1 instrumentation.
instrumentation/couchbase/couchbase-3.1/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1/CouchbaseClient31Test.java Adds stable DB semconv attribute assertions for Couchbase 3.1.
instrumentation/couchbase/couchbase-3.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1/CouchbaseRequestTracer.java New wrapper tracer that translates old DB semconv attributes to stable DB semconv (includes muzzle handling notes for 3.1.0–3.1.2).
instrumentation/couchbase/couchbase-3.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1/CouchbaseEnvironmentInstrumentation.java Switches environment instrumentation to install the new wrapper tracer.
instrumentation/couchbase/couchbase-3.1/javaagent/build.gradle.kts Adds muzzle compileOnly dep for @NoMuzzle and adds the new stable-semconv experimental test task to check.
instrumentation/couchbase/couchbase-3.1.6/metadata.yaml Adds documented configuration for Couchbase 3.1.6 instrumentation.
instrumentation/couchbase/couchbase-3.1.6/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1_6/CouchbaseClient316Test.java Adds stable DB semconv attribute assertions for Couchbase 3.1.6.
instrumentation/couchbase/couchbase-3.1.6/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1_6/CouchbaseRequestTracer.java New wrapper tracer that translates old DB semconv attributes to stable DB semconv.
instrumentation/couchbase/couchbase-3.1.6/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1_6/CouchbaseEnvironmentInstrumentation.java Switches environment instrumentation to install the new wrapper tracer.
instrumentation/couchbase/couchbase-3.1.6/javaagent/build.gradle.kts Adds an additional stable-semconv test task enabling Couchbase experimental attributes and wires it into check.
.github/scripts/instrumentations.sh Adds Couchbase 3.x stable semconv test tasks to the CI instrumentation task list.

Comment thread instrumentation/couchbase/README.md Outdated
Comment thread instrumentation/couchbase/couchbase-3.1/metadata.yaml Outdated
Comment thread instrumentation/couchbase/couchbase-3.1.6/metadata.yaml Outdated
Comment thread instrumentation/couchbase/couchbase-3.2/metadata.yaml Outdated
Comment thread instrumentation/couchbase/couchbase-3.4/metadata.yaml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Comment thread instrumentation/couchbase/README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 25 changed files in this pull request and generated 4 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 25 changed files in this pull request and generated no new comments.

@trask
trask marked this pull request as ready for review June 8, 2026 03:54
@trask
trask requested a review from a team as a code owner June 8, 2026 03:54
Comment thread instrumentation/couchbase/couchbase-3.1.6/metadata.yaml
Comment thread instrumentation/couchbase/couchbase-3.2/metadata.yaml
Comment thread instrumentation/couchbase/couchbase-3.4/metadata.yaml
@trask
trask merged commit e661133 into open-telemetry:main Jun 9, 2026
182 of 184 checks passed
@trask
trask deleted the couchbase-3x-stable-db branch June 9, 2026 13:28
@@ -2,4 +2,4 @@

| System property | Type | Default | Description |
|---------------------------------------------------------------|---------|---------|-------------------------------------------------------------------------|

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs reformat

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trask trask mentioned this pull request Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants