From 3415c2d6a310c4449c02ac1de6fd22dc61d20bd0 Mon Sep 17 00:00:00 2001 From: Marten Hennoch Date: Thu, 23 Nov 2023 12:14:05 +0200 Subject: [PATCH] fix(instrumentation-net): Don't operate on closed span --- .../opentelemetry-instrumentation-net/src/instrumentation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts index 848744bf42..3b50edfbfa 100644 --- a/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts @@ -162,7 +162,7 @@ export class NetInstrumentation extends InstrumentationBase { } }; - for (const event of [SocketEvent.CLOSE, SocketEvent.ERROR]) { + for (const event of [SocketEvent.CLOSE, SocketEvent.ERROR, SocketEvent.SECURE_CONNECT]) { socket.once(event, otelTlsRemoveListeners); }