Remove db.connection_string from redis instrumentation
MODIFY
instrumentation/jedis/jedis-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v1_4/JedisDbAttributesExtractor.java
instrumentation/jedis/jedis-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v1_4/JedisDbAttributesExtractor.java
@@ -29,7 +29,7 @@ final class JedisDbAttributesExtractor extends DbAttributesExtractor<JedisReques
@Override
protected String connectionString(JedisRequest request) {
- return request.getConnectionString();
+ return null;
}
@Override

MODIFY
instrumentation/jedis/jedis-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v1_4/JedisRequest.java
instrumentation/jedis/jedis-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v1_4/JedisRequest.java
@@ -21,10 +21,6 @@ public abstract class JedisRequest {
public abstract List<byte[]> getArgs();
- public String getConnectionString() {
- return getConnection().getHost() + ":" + getConnection().getPort();
- }
-
public static JedisRequest create(Connection connection, Protocol.Command command) {
return new AutoValue_JedisRequest(connection, command, emptyList());
}

MODIFY
instrumentation/jedis/jedis-1.4/javaagent/src/test/groovy/JedisClientTest.groovy
instrumentation/jedis/jedis-1.4/javaagent/src/test/groovy/JedisClientTest.groovy
@@ -49,7 +49,6 @@ class JedisClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "SET foo ?"
"$SemanticAttributes.DB_OPERATION.key" "SET"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
@@ -75,7 +74,6 @@ class JedisClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "SET foo ?"
"$SemanticAttributes.DB_OPERATION.key" "SET"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
@@ -89,7 +87,6 @@ class JedisClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "GET foo"
"$SemanticAttributes.DB_OPERATION.key" "GET"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
@@ -115,7 +112,6 @@ class JedisClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "SET foo ?"
"$SemanticAttributes.DB_OPERATION.key" "SET"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
@@ -129,7 +125,6 @@ class JedisClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "RANDOMKEY"
"$SemanticAttributes.DB_OPERATION.key" "RANDOMKEY"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"

MODIFY
instrumentation/jedis/jedis-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/JedisClientTracer.java
instrumentation/jedis/jedis-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/JedisClientTracer.java
@@ -47,7 +47,7 @@ public class JedisClientTracer extends DatabaseClientTracer<Connection, CommandW
@Override
protected String dbConnectionString(Connection connection) {
- return connection.getHost() + ":" + connection.getPort();
+ return null;
}
@Override

MODIFY
instrumentation/jedis/jedis-3.0/javaagent/src/test/groovy/Jedis30ClientTest.groovy
instrumentation/jedis/jedis-3.0/javaagent/src/test/groovy/Jedis30ClientTest.groovy
@@ -49,7 +49,6 @@ class Jedis30ClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "SET foo ?"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
@@ -75,7 +74,6 @@ class Jedis30ClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "SET foo ?"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
@@ -89,7 +87,6 @@ class Jedis30ClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "GET foo"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
@@ -115,7 +112,6 @@ class Jedis30ClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "SET foo ?"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
@@ -129,7 +125,6 @@ class Jedis30ClientTest extends AgentInstrumentationSpecification {
kind CLIENT
attributes {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.DB_STATEMENT.key" "RANDOMKEY"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"

MODIFY
instrumentation/lettuce/lettuce-5.1/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/lettuce/v5_1/LettuceReactiveClientTest.groovy
instrumentation/lettuce/lettuce-5.1/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/lettuce/v5_1/LettuceReactiveClientTest.groovy
@@ -48,7 +48,6 @@ class LettuceReactiveClientTest extends AbstractLettuceReactiveClientTest implem
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "SET a ?"
}
@@ -67,7 +66,6 @@ class LettuceReactiveClientTest extends AbstractLettuceReactiveClientTest implem
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "GET a"
}

MODIFY
instrumentation/lettuce/lettuce-5.1/library/src/main/java/io/opentelemetry/instrumentation/lettuce/v5_1/OpenTelemetryTracing.java
instrumentation/lettuce/lettuce-5.1/library/src/main/java/io/opentelemetry/instrumentation/lettuce/v5_1/OpenTelemetryTracing.java
@@ -319,13 +319,5 @@ final class OpenTelemetryTracing implements Tracing {
private static void fillEndpoint(AttributeSetter span, OpenTelemetryEndpoint endpoint) {
span.setAttribute(SemanticAttributes.NET_TRANSPORT, IP_TCP);
NetPeerAttributes.INSTANCE.setNetPeer(span, endpoint.name, endpoint.ip, endpoint.port);
-
- StringBuilder redisUrl =
- new StringBuilder("redis://").append(endpoint.name != null ? endpoint.name : endpoint.ip);
- if (endpoint.port > 0) {
- redisUrl.append(":").append(endpoint.port);
- }
-
- span.setAttribute(SemanticAttributes.DB_CONNECTION_STRING, redisUrl.toString());
}
}

MODIFY
instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceAsyncClientTest.groovy
instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceAsyncClientTest.groovy
@@ -146,7 +146,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "SET TESTSETKEY ?"
}
@@ -188,7 +187,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "GET TESTKEY"
}
@@ -244,7 +242,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "GET NON_EXISTENT_KEY"
}
@@ -286,7 +283,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_STATEMENT.key}" "RANDOMKEY"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
}
@@ -346,7 +342,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "HMSET TESTHM firstname ? lastname ? age ?"
}
@@ -366,7 +361,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "HGETALL TESTHM"
}

MODIFY
instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceReactiveClientTest.groovy
instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceReactiveClientTest.groovy
@@ -95,7 +95,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "SET TESTSETKEY ?"
}
@@ -128,7 +127,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "GET TESTKEY"
}
@@ -169,7 +167,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "GET NON_EXISTENT_KEY"
}
@@ -208,7 +205,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_STATEMENT.key}" "RANDOMKEY"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
}
@@ -237,7 +233,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_STATEMENT.key}" "COMMAND"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
}
@@ -285,7 +280,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "SET a ?"
}
@@ -304,7 +298,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "GET a"
}
@@ -343,7 +336,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "SET a ?"
}
@@ -362,7 +354,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "GET a"
}

MODIFY
instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientAuthTest.groovy
instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientAuthTest.groovy
@@ -70,7 +70,6 @@ abstract class AbstractLettuceSyncClientAuthTest extends InstrumentationSpecific
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "AUTH ?"
}

MODIFY
instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientTest.groovy
instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientTest.groovy
@@ -133,7 +133,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "SET TESTSETKEY ?"
}
@@ -167,7 +166,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_NAME.key}" "localhost"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://localhost:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "SET TESTSETKEY ?"
}
@@ -197,7 +195,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "GET TESTKEY"
}
@@ -227,7 +224,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "GET NON_EXISTENT_KEY"
}
@@ -257,7 +253,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_STATEMENT.key}" "RANDOMKEY"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
}
@@ -287,7 +282,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "LPUSH TESTLIST ?"
}
@@ -317,7 +311,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "HMSET user firstname ? lastname ? age ?"
}
@@ -347,7 +340,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "HGETALL TESTHM"
}
@@ -382,7 +374,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "EVAL $b64Script 1 TESTLIST ? ?"
}
@@ -416,7 +407,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "MSET key1 ? key2 ?"
}
@@ -446,7 +436,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "DEBUG SEGFAULT"
}
@@ -483,7 +472,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio
"${SemanticAttributes.NET_TRANSPORT.key}" IP_TCP
"${SemanticAttributes.NET_PEER_IP.key}" "127.0.0.1"
"${SemanticAttributes.NET_PEER_PORT.key}" port
- "${SemanticAttributes.DB_CONNECTION_STRING.key}" "redis://127.0.0.1:$port"
"${SemanticAttributes.DB_SYSTEM.key}" "redis"
"${SemanticAttributes.DB_STATEMENT.key}" "SHUTDOWN NOSAVE"
if (!Boolean.getBoolean("testLatestDeps")) {

MODIFY
instrumentation/redisson-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/redisson/RedissonDbAttributesExtractor.java
instrumentation/redisson-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/redisson/RedissonDbAttributesExtractor.java
@@ -12,7 +12,6 @@ import io.netty.buffer.ByteBuf;
import io.opentelemetry.instrumentation.api.db.RedisCommandSanitizer;
import io.opentelemetry.instrumentation.api.instrumenter.db.DbAttributesExtractor;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
-import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@@ -43,8 +42,7 @@ final class RedissonDbAttributesExtractor extends DbAttributesExtractor<Redisson
@Override
protected String connectionString(RedissonRequest request) {
- InetSocketAddress remoteAddress = request.getAddress();
- return remoteAddress.getHostString() + ":" + remoteAddress.getPort();
+ return null;
}
@Override

MODIFY
instrumentation/redisson-3.0/javaagent/src/test/groovy/RedissonAsyncClientTest.groovy
instrumentation/redisson-3.0/javaagent/src/test/groovy/RedissonAsyncClientTest.groovy
@@ -71,7 +71,6 @@ class RedissonAsyncClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "SET foo ?"
"$SemanticAttributes.DB_OPERATION.key" "SET"
@@ -101,7 +100,6 @@ class RedissonAsyncClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "SADD set1 ?"
"$SemanticAttributes.DB_OPERATION.key" "SADD"
@@ -116,7 +114,6 @@ class RedissonAsyncClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "RPUSH list1 ?"
"$SemanticAttributes.DB_OPERATION.key" "RPUSH"

MODIFY
instrumentation/redisson-3.0/javaagent/src/test/groovy/RedissonClientTest.groovy
instrumentation/redisson-3.0/javaagent/src/test/groovy/RedissonClientTest.groovy
@@ -76,7 +76,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "SET foo ?"
"$SemanticAttributes.DB_OPERATION.key" "SET"
@@ -91,7 +90,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "GET foo"
"$SemanticAttributes.DB_OPERATION.key" "GET"
@@ -118,7 +116,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "SET batch1 ?;SET batch2 ?"
"$SemanticAttributes.DB_OPERATION.key" null
@@ -143,7 +140,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "RPUSH list1 ?"
"$SemanticAttributes.DB_OPERATION.key" "RPUSH"
@@ -171,7 +167,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "EVAL $script 1 map1 ? ?"
"$SemanticAttributes.DB_OPERATION.key" "EVAL"
@@ -186,7 +181,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "HGET map1 key1"
"$SemanticAttributes.DB_OPERATION.key" "HGET"
@@ -211,7 +205,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "SADD set1 ?"
"$SemanticAttributes.DB_OPERATION.key" "SADD"
@@ -240,7 +233,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "ZADD sort_set1 ? ? ? ? ? ?"
"$SemanticAttributes.DB_OPERATION.key" "ZADD"
@@ -265,7 +257,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" "INCR AtomicLong"
"$SemanticAttributes.DB_OPERATION.key" "INCR"
@@ -295,7 +286,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" { lockScriptPattern.matcher(it).matches() }
"$SemanticAttributes.DB_OPERATION.key" "EVAL"
@@ -312,7 +302,6 @@ class RedissonClientTest extends AgentInstrumentationSpecification {
"$SemanticAttributes.DB_SYSTEM.key" "redis"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_NAME.key" "localhost"
- "$SemanticAttributes.DB_CONNECTION_STRING.key" "localhost:$port"
"$SemanticAttributes.NET_PEER_PORT.key" port
"$SemanticAttributes.DB_STATEMENT.key" { lockScriptPattern.matcher(it).matches() }
"$SemanticAttributes.DB_OPERATION.key" "EVAL"

Remove db.connection_string from redis instrumentation (#3094)