Fix Geode stable DB semconv attributes#18992
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Geode (and the shared DB semconv incubator APIs/tests) to align stable database semantic conventions with db.collection.name for “collection/region” naming, while keeping legacy db.name / db.operation behavior available for old semconv emission.
Changes:
- Geode: emit region name via the new
getDbCollectionName()hook and stop usingdb.namespacefor region naming. - Incubator DB semconv: add
getDbCollectionName()and a deprecatedgetDbOperation()hook to support separating stable vs legacy attributes. - Tests: update Geode and incubator DB extractor/span-name tests to validate the new attribute and span-name behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| instrumentation/geode-1.4/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/geode/v1_4/PutGetTest.java | Updates Geode span + metric assertions to validate stable db.collection.name and legacy db.name behavior. |
| instrumentation/geode-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/geode/v1_4/GeodeDbAttributesGetter.java | Implements stable getDbCollectionName() for region name and keeps deprecated getDbName() for old semconv. |
| instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientSpanNameExtractorTest.java | Expands/adjusts span-name tests for stable collection-name precedence and updated SQL empty-query fallbacks. |
| instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientAttributesExtractorTest.java | Adds coverage for db.collection.name and legacy db.operation extraction. |
| instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/SqlClientAttributesGetter.java | Documents that SQL parsing should provide operation/collection when configured, discouraging overriding these getters. |
| instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientSpanNameExtractor.java | Uses getDbCollectionName() in stable span-name fallback order; uses deprecated getDbOperation() for old semconv paths. |
| instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientAttributesGetter.java | Adds getDbCollectionName() and deprecated getDbOperation() hooks to support stable/legacy split. |
| instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/DbClientAttributesExtractor.java | Emits stable db.collection.name; uses getDbOperation() for legacy db.operation. |
b25f709 to
ce90114
Compare
ce90114 to
c389066
Compare
c389066 to
8f423cf
Compare
laurit
approved these changes
Jun 15, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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 Geode to emit region names as stable
db.collection.namewhile preserving the olddb.namebehavior for legacy database semantic conventions.