diff --git a/dev-packages/node-integration-tests/suites/pino/test.ts b/dev-packages/node-integration-tests/suites/pino/test.ts index f9cdb143ddff..19fb5d80387a 100644 --- a/dev-packages/node-integration-tests/suites/pino/test.ts +++ b/dev-packages/node-integration-tests/suites/pino/test.ts @@ -84,6 +84,8 @@ conditionalTest({ min: 20 })('Pino integration', () => { attributes: { name: { value: 'myapp', type: 'string' }, module: { value: 'authentication', type: 'string' }, + msg: { value: 'oh no', type: 'string' }, + err: { value: expect.any(String), type: 'string' }, 'pino.logger.level': { value: 50, type: 'integer' }, 'sentry.origin': { value: 'auto.logging.pino', type: 'string' }, 'sentry.release': { value: '1.0', type: 'string' }, @@ -159,6 +161,8 @@ conditionalTest({ min: 20 })('Pino integration', () => { severity_number: 17, attributes: { name: { value: 'myapp', type: 'string' }, + msg: { value: 'oh no', type: 'string' }, + err: { value: expect.any(String), type: 'string' }, 'pino.logger.level': { value: 50, type: 'integer' }, 'sentry.origin': { value: 'auto.logging.pino', type: 'string' }, 'sentry.release': { value: '1.0', type: 'string' }, @@ -211,6 +215,7 @@ conditionalTest({ min: 20 })('Pino integration', () => { name: { value: 'myapp', type: 'string' }, module: { value: 'authentication', type: 'string' }, msg: { value: 'oh no', type: 'string' }, + err: { value: expect.any(String), type: 'string' }, 'pino.logger.level': { value: 50, type: 'integer' }, 'sentry.origin': { value: 'auto.logging.pino', type: 'string' }, 'sentry.release': { value: '1.0', type: 'string' }, diff --git a/packages/node-core/src/integrations/pino.ts b/packages/node-core/src/integrations/pino.ts index 7c3e0c2c813f..68c17ded1abe 100644 --- a/packages/node-core/src/integrations/pino.ts +++ b/packages/node-core/src/integrations/pino.ts @@ -86,12 +86,11 @@ type PinoResult = { time?: string; pid?: number; hostname?: string; - err?: Error; } & Record; function stripIgnoredFields(result: PinoResult): PinoResult { // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { level, time, pid, hostname, err, ...rest } = result; + const { level, time, pid, hostname, ...rest } = result; return rest; }