From 689829b16ae7df1bf569068f03a05c1c831c25b6 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 22 Feb 2022 09:48:55 -0800 Subject: [PATCH 1/2] fix(ioredis): net.peer.ip -> db.connection_string --- .../src/instrumentation.ts | 2 +- .../opentelemetry-instrumentation-ioredis/test/ioredis.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts index d3a26a9ec3..fcc2e09b96 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 { 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 = { From 105b4918732b6016d5e8429c9e6327cca1b13b45 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 24 Feb 2022 11:02:21 -0800 Subject: [PATCH 2/2] fixup! fix(ioredis): net.peer.ip -> db.connection_string --- .../src/instrumentation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts index fcc2e09b96..f2cb655187 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts @@ -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);