Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e05acdd

Browse files
authored
fix(node): Pino capture serialized err (#17999)
1 parent 7aa886c commit e05acdd

File tree

2 files changed

+6
-2
lines changed
  • dev-packages/node-integration-tests/suites/pino
  • packages/node-core/src/integrations

2 files changed

+6
-2
lines changed

‎dev-packages/node-integration-tests/suites/pino/test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ conditionalTest({ min: 20 })('Pino integration', () => {
8484
attributes: {
8585
name: { value: 'myapp', type: 'string' },
8686
module: { value: 'authentication', type: 'string' },
87+
msg: { value: 'oh no', type: 'string' },
88+
err: { value: expect.any(String), type: 'string' },
8789
'pino.logger.level': { value: 50, type: 'integer' },
8890
'sentry.origin': { value: 'auto.logging.pino', type: 'string' },
8991
'sentry.release': { value: '1.0', type: 'string' },
@@ -159,6 +161,8 @@ conditionalTest({ min: 20 })('Pino integration', () => {
159161
severity_number: 17,
160162
attributes: {
161163
name: { value: 'myapp', type: 'string' },
164+
msg: { value: 'oh no', type: 'string' },
165+
err: { value: expect.any(String), type: 'string' },
162166
'pino.logger.level': { value: 50, type: 'integer' },
163167
'sentry.origin': { value: 'auto.logging.pino', type: 'string' },
164168
'sentry.release': { value: '1.0', type: 'string' },
@@ -211,6 +215,7 @@ conditionalTest({ min: 20 })('Pino integration', () => {
211215
name: { value: 'myapp', type: 'string' },
212216
module: { value: 'authentication', type: 'string' },
213217
msg: { value: 'oh no', type: 'string' },
218+
err: { value: expect.any(String), type: 'string' },
214219
'pino.logger.level': { value: 50, type: 'integer' },
215220
'sentry.origin': { value: 'auto.logging.pino', type: 'string' },
216221
'sentry.release': { value: '1.0', type: 'string' },

‎packages/node-core/src/integrations/pino.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,11 @@ type PinoResult = {
8686
time?: string;
8787
pid?: number;
8888
hostname?: string;
89-
err?: Error;
9089
} & Record<string, unknown>;
9190

9291
function stripIgnoredFields(result: PinoResult): PinoResult {
9392
// eslint-disable-next-line @typescript-eslint/no-unused-vars
94-
const { level, time, pid, hostname, err,...rest } = result;
93+
const { level, time, pid, hostname, ...rest } = result;
9594
return rest;
9695
}
9796

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /