From b7c32f29d0a3ac88935f30bea569395ee184ace5 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Tue, 5 Nov 2024 15:43:29 -0800 Subject: [PATCH] fix(instrumentation-undici): fix a possible crash if the request path is a full URL Closes: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2471 --- .../node/instrumentation-undici/src/undici.ts | 9 +++++- .../test/undici.test.ts | 28 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/plugins/node/instrumentation-undici/src/undici.ts b/plugins/node/instrumentation-undici/src/undici.ts index 5a6799137f..949b1e11c7 100644 --- a/plugins/node/instrumentation-undici/src/undici.ts +++ b/plugins/node/instrumentation-undici/src/undici.ts @@ -188,7 +188,14 @@ export class UndiciInstrumentation extends InstrumentationBase