Skip to content

Commit a06443b

Browse files
authored
fix(node-core): Align pino mechanism type with spec conventions (#19363)
In #18631 we noticed that Pino logs didn't match the [mechanism types](https://develop.sentry.dev/sdk/data-model/event-payloads/exception/#exception-mechanism) we are expecting, this PR addresses that.
1 parent f5a2219 commit a06443b

File tree

2 files changed

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

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ conditionalTest({ min: 20 })('Pino integration', () => {
3838
type: 'Error',
3939
value: 'oh no',
4040
mechanism: {
41-
type: 'pino',
41+
type: 'auto.log.pino',
4242
handled: true,
4343
},
4444
stacktrace: {
@@ -116,7 +116,7 @@ conditionalTest({ min: 20 })('Pino integration', () => {
116116
type: 'Error',
117117
value: 'oh no',
118118
mechanism: {
119-
type: 'pino',
119+
type: 'auto.log.pino',
120120
handled: true,
121121
},
122122
stacktrace: {
@@ -311,7 +311,7 @@ conditionalTest({ min: 20 })('Pino integration', () => {
311311
type: 'Error',
312312
value: 'Custom error key',
313313
mechanism: {
314-
type: 'pino',
314+
type: 'auto.log.pino',
315315
handled: true,
316316
},
317317
stacktrace: {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const _pinoIntegration = defineIntegration((userOptions: DeepPartial<PinoOptions
162162

163163
addExceptionMechanism(event, {
164164
handled: options.error.handled,
165-
type: 'pino',
165+
type: 'auto.log.pino',
166166
});
167167

168168
return event;

0 commit comments

Comments
 (0)