Skip to content

Commit 5fd6bd8

Browse files
committed
Fix SqlClientAttributesExtractor to capture network.type unconditionally
Changed InternalNetworkAttributesExtractor initialization to always capture protocol attributes (network.type, network.transport, etc.) by passing true instead of SemconvStability.emitOldDatabaseSemconv(). network.type is a stable attribute that should always be captured for database spans, not just when old database semconv is enabled. This fixes Cassandra and R2DBC tests that expect network.type to be 'ipv4' or 'ipv6'.
1 parent 1afddbc commit 5fd6bd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/SqlClientAttributesExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static <REQUEST, RESPONSE> SqlClientAttributesExtractorBuilder<REQUEST, R
8989
this.captureQueryParameters = captureQueryParameters;
9090
internalNetworkExtractor =
9191
new InternalNetworkAttributesExtractor<>(
92-
getter, SemconvStability.emitOldDatabaseSemconv(), false);
92+
getter, true, false);
9393
serverAttributesExtractor = ServerAttributesExtractor.create(getter);
9494
}
9595

0 commit comments

Comments
 (0)