diff --git a/.changeset/eighty-brooms-help.md b/.changeset/eighty-brooms-help.md new file mode 100644 index 000000000..2dc0c7681 --- /dev/null +++ b/.changeset/eighty-brooms-help.md @@ -0,0 +1,5 @@ +--- +"@saleor/apps-logger": patch +--- + +Fix Vercel runtime transport logs attribute order - attributes from logs context will be first so log attributes can override them. diff --git a/packages/logger/src/logger-vercel-runtime-transport.ts b/packages/logger/src/logger-vercel-runtime-transport.ts index 0ba10f2e6..d9d0a21d0 100644 --- a/packages/logger/src/logger-vercel-runtime-transport.ts +++ b/packages/logger/src/logger-vercel-runtime-transport.ts @@ -26,8 +26,8 @@ export const attachLoggerVercelRuntimeTransport = ( const stringifiedMessage = JSON.stringify({ message: bodyMessage, - ...attributes, ...(loggerContext?.getRawContext() ?? {}), + ...attributes, deployment: { environment: process.env.ENV, },