From ffa9f9bd0f12458cc40231a19e42988664a0e432 Mon Sep 17 00:00:00 2001 From: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:36:39 -0800 Subject: [PATCH] Tests --- .../src/instrumentation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts index 44b732839c..d572e673fa 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts @@ -250,7 +250,7 @@ export class WinstonInstrumentation extends InstrumentationBase { private _emitLogRecord(record: Record): void { const { message, msg, level, meta, ...splat } = record; - const attributes = Object.assign(meta, {}); + const attributes = Object.assign(meta ?? {}, {}); for (const key in splat) { if (Object.prototype.hasOwnProperty.call(splat, key)) { attributes[key] = splat[key];