diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts index d3a26a9ec3..f2cb655187 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts @@ -143,7 +143,7 @@ export class IORedisInstrumentation extends InstrumentationBase< span.setAttributes({ [SemanticAttributes.NET_PEER_NAME]: host, [SemanticAttributes.NET_PEER_PORT]: port, - [SemanticAttributes.NET_PEER_IP]: `redis://${host}:${port}`, + [SemanticAttributes.DB_CONNECTION_STRING]: `redis://${host}:${port}`, }); try { @@ -195,7 +195,7 @@ export class IORedisInstrumentation extends InstrumentationBase< span.setAttributes({ [SemanticAttributes.NET_PEER_NAME]: host, [SemanticAttributes.NET_PEER_PORT]: port, - [SemanticAttributes.NET_PEER_IP]: `redis://${host}:${port}`, + [SemanticAttributes.DB_CONNECTION_STRING]: `redis://${host}:${port}`, }); try { const client = original.apply(this, arguments); diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/test/ioredis.test.ts b/plugins/node/opentelemetry-instrumentation-ioredis/test/ioredis.test.ts index 2a346a81b1..879d729653 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/test/ioredis.test.ts +++ b/plugins/node/opentelemetry-instrumentation-ioredis/test/ioredis.test.ts @@ -54,7 +54,7 @@ const DEFAULT_ATTRIBUTES = { [SemanticAttributes.DB_SYSTEM]: IORedisInstrumentation.DB_SYSTEM, [SemanticAttributes.NET_PEER_NAME]: CONFIG.host, [SemanticAttributes.NET_PEER_PORT]: CONFIG.port, - [SemanticAttributes.NET_PEER_IP]: URL, + [SemanticAttributes.DB_CONNECTION_STRING]: URL, }; const unsetStatus: SpanStatus = {