Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- ref(astro): Adjust `mechanism` on error events captured by astro middleware ([#17613](https://github.com/getsentry/sentry-javascript/pull/17613))
- ref(aws-severless): Slightly adjust aws-serverless mechanism type ([#17614](https://github.com/getsentry/sentry-javascript/pull/17614))
- ref(bun): Adjust `mechanism` of errors captured in Bun.serve ([#17616](https://github.com/getsentry/sentry-javascript/pull/17616))
- ref(core): Adjust `mechanism` in `captureConsoleIntegration` ([#17633](https://github.com/getsentry/sentry-javascript/pull/17633))
- ref(core): Adjust MCP server error event `mechanism` ([#17622](https://github.com/getsentry/sentry-javascript/pull/17622))
- ref(core): Simplify `linkedErrors` mechanism logic ([#17600](https://github.com/getsentry/sentry-javascript/pull/17600))
- ref(nextjs): Set more specific event `mechanism`s ([#17543](https://github.com/getsentry/sentry-javascript/pull/17543))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ sentryTest(
expect(logEvent?.exception?.values![0]).toMatchObject({
mechanism: {
handled: true,
type: 'console',
type: 'auto.core.capture_console',
synthetic: true,
},
value: 'console log',
Expand All @@ -59,7 +59,7 @@ sentryTest(
expect(warnEvent?.exception?.values![0]).toMatchObject({
mechanism: {
handled: true,
type: 'console',
type: 'auto.core.capture_console',
synthetic: true,
},
value: 'console warn',
Expand All @@ -81,7 +81,7 @@ sentryTest(
expect(infoEvent?.exception?.values![0]).toMatchObject({
mechanism: {
handled: true,
type: 'console',
type: 'auto.core.capture_console',
synthetic: true,
},
value: 'console info',
Expand All @@ -103,7 +103,7 @@ sentryTest(
expect(errorEvent?.exception?.values![0]).toMatchObject({
mechanism: {
handled: true,
type: 'console',
type: 'auto.core.capture_console',
synthetic: true,
},
value: 'console error',
Expand All @@ -125,7 +125,7 @@ sentryTest(
expect(traceEvent?.exception?.values![0]).toMatchObject({
mechanism: {
handled: true,
type: 'console',
type: 'auto.core.capture_console',
synthetic: true,
},
value: 'console trace',
Expand Down Expand Up @@ -153,7 +153,7 @@ sentryTest(
expect(errorWithErrorEvent?.exception?.values?.[0].value).toBe('console error with error object');
expect(errorWithErrorEvent?.exception?.values?.[0].mechanism).toEqual({
handled: true,
type: 'console',
type: 'auto.core.capture_console',
});
expect(traceWithErrorEvent).toEqual(
expect.objectContaining({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ sentryTest('it captures console messages correctly', async ({ getLocalTestUrl, p
expect(errorWithErrorEvent?.exception?.values?.[0].value).toBe('console error with error object');
expect(errorWithErrorEvent?.exception?.values?.[0].mechanism).toEqual({
handled: true,
type: 'console',
type: 'auto.core.capture_console',
});
expect(traceWithErrorEvent).toEqual(
expect.objectContaining({
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/integrations/captureconsole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function consoleHandler(args: unknown[], level: string, handled: boolean): void

addExceptionMechanism(event, {
handled,
type: 'console',
type: 'auto.core.capture_console',
});

return event;
Expand Down
6 changes: 3 additions & 3 deletions packages/core/test/lib/integrations/captureconsole.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ describe('CaptureConsole setup', () => {

expect(someEvent.exception?.values?.[0]?.mechanism).toEqual({
handled: true,
type: 'console',
type: 'auto.core.capture_console',
});
});

Expand All @@ -352,7 +352,7 @@ describe('CaptureConsole setup', () => {

expect(someEvent.exception?.values?.[0]?.mechanism).toEqual({
handled: true,
type: 'console',
type: 'auto.core.capture_console',
});
});

Expand All @@ -376,7 +376,7 @@ describe('CaptureConsole setup', () => {

expect(someEvent.exception?.values?.[0]?.mechanism).toEqual({
handled: false,
type: 'console',
type: 'auto.core.capture_console',
});
});
});
Expand Down