Remove network.type from stable Cassandra db spans#18920
Merged
laurit merged 3 commits intoJun 8, 2026
Conversation
network.type from stable Cassandra db spans
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates database span semantic-convention behavior so that network.type is not emitted when stable database semantic conventions are enabled, aligning Cassandra instrumentation tests with the expected stable DB span attribute set.
Changes:
- Update Cassandra 3.0/4.0/4.4 tests to expect
network.typeto be absent (null) when stable database semconv is enabled. - Adjust
SqlClientAttributesExtractorto only capture network protocol attributes (includingnetwork.type) when old database semconv is enabled.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| instrumentation/cassandra/cassandra-common-4.0/testing/src/main/java/io/opentelemetry/cassandra/common/v4_0/AbstractCassandraTest.java | Updates span assertions so network.type is expected only under old DB semconv. |
| instrumentation/cassandra/cassandra-4.4/testing/src/main/java/io/opentelemetry/testing/cassandra/v4_4/AbstractCassandra44Test.java | Updates reactive span assertions to match removal of network.type under stable DB semconv. |
| instrumentation/cassandra/cassandra-3.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/cassandra/v3_0/CassandraClientTest.java | Updates javaagent test assertions to expect network.type == null under stable DB semconv. |
| instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/SqlClientAttributesExtractor.java | Gates capture of protocol-level network attributes on emitOldDatabaseSemconv(), preventing network.type on stable DB spans. |
The stable semconv Cassandra span no longer emits network.type, but the Camel 2.20 Cassandra test still required that attribute in its exact stable-mode assertion. Remove the stale assertion and unused import so testStableSemconv matches the emitted stable attributes. Validation: .\gradlew.bat :instrumentation:camel-2.20:javaagent:testStableSemconv .\gradlew.bat :instrumentation:camel-2.20:javaagent:testStableSemconv -PtestLatestDeps=true
trask
force-pushed
the
cassandra-stable-db-network-type
branch
from
June 6, 2026 22:00
530cfae to
1095eec
Compare
trask
marked this pull request as ready for review
June 6, 2026 23:00
laurit
approved these changes
Jun 8, 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.
No description provided.