diff --git a/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts index 848744bf42..e3aa6f1e33 100644 --- a/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts @@ -162,7 +162,11 @@ 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); }