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];