Fix HBase stable DB semconv attributes#18990
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
TableNamethrough request creation (instead of flattening to aString) so stable semconv can emit additional DB attributes. - Extend DB client semconv incubator APIs to support
db.collection.nameand to preserve olddb.operationvia 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. |
500a625 to
1c84ec7
Compare
1c84ec7 to
15ca877
Compare
laurit
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Built on top of #18989. Updates HBase to preserve the HBase
TableNamethrough request creation so stable database semconv can emit namespace and collection separately while old semconv keeps the previousdb.namevalue.