Skip to content

Fix HBase stable DB semconv attributes#18990

Merged
trask merged 2 commits into
open-telemetry:mainfrom
trask:hbase-stable-db-semconv
Jun 15, 2026
Merged

Fix HBase stable DB semconv attributes#18990
trask merged 2 commits into
open-telemetry:mainfrom
trask:hbase-stable-db-semconv

Conversation

@trask

@trask trask commented Jun 14, 2026

Copy link
Copy Markdown
Member

Built on top of #18989. Updates HBase to preserve the HBase TableName through request creation so stable database semconv can emit namespace and collection separately while old semconv keeps the previous db.name value.

Copilot AI review requested due to automatic review settings June 14, 2026 02:25
@trask trask requested a review from a team as a code owner June 14, 2026 02:25

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 builds on the DB client semconv migration work to improve HBase and shared DB semconv handling so stable database semantic conventions can emit richer/cleaner attributes while preserving old-semconv behavior where required.

Changes:

  • Update HBase javaagent request propagation to preserve TableName through request creation (instead of flattening to a String) so stable semconv can emit additional DB attributes.
  • Extend DB client semconv incubator APIs to support db.collection.name and to preserve old db.operation via a deprecated hook.
  • Update shared DB span-name/attributes extractor tests and HBase tests for the new stable/old semconv behaviors.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
instrumentation/hbase-client-2.0/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/hbase/testing/AbstractHbaseTest.java Updates HBase assertions to validate stable db.collection.name behavior alongside existing old/stable semconv checks.
instrumentation/hbase-client-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hbase/client/v2_0/RegionServerCallableInstrumentation.java Preserves TableName in thread-local propagation to support downstream request/span attribute extraction.
instrumentation/hbase-client-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hbase/client/v2_0/HbaseSingletons.java Switches thread-local storage and accessor signatures from String to TableName.
instrumentation/hbase-client-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hbase/client/v2_0/HbaseRequest.java Carries TableName on the request object to support stable semconv namespace/collection extraction.
instrumentation/hbase-client-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hbase/client/v2_0/HbaseAttributesGetter.java Implements stable getDbNamespace() / getDbCollectionName() and old getDbName() mapping for HBase.
instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientSpanNameExtractorTest.java Expands/adjusts tests for stable/old span-name fallbacks and collection-vs-namespace preference.
instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientAttributesExtractorTest.java Validates stable db.collection.name extraction and old db.operation preservation via deprecated hook.
instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/SqlClientAttributesGetter.java Updates interface documentation around operation/collection derivation for SQL clients.
instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientSpanNameExtractor.java Adjusts stable span-name computation to prefer db.collection.name and to use old db.operation when emitting old semconv.
instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientAttributesGetter.java Adds deprecated getDbOperation() hook for old semconv and introduces getDbCollectionName() for stable semconv.
instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientAttributesExtractor.java Emits stable db.collection.name and uses deprecated getDbOperation() for old db.operation.

@trask trask marked this pull request as draft June 14, 2026 02:56
@trask trask force-pushed the hbase-stable-db-semconv branch 3 times, most recently from 500a625 to 1c84ec7 Compare June 15, 2026 04:10
@trask trask force-pushed the hbase-stable-db-semconv branch from 1c84ec7 to 15ca877 Compare June 15, 2026 14:54
@trask trask requested a review from Copilot June 15, 2026 16:29
@trask trask marked this pull request as ready for review June 15, 2026 16:29

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 5 out of 5 changed files in this pull request and generated 3 comments.

@trask trask enabled auto-merge (squash) June 15, 2026 16:59
@trask trask merged commit 4989331 into open-telemetry:main Jun 15, 2026
95 checks passed
@trask trask deleted the hbase-stable-db-semconv branch June 15, 2026 17:09
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.

3 participants