Skip to content

Commit 702cc87

Browse files
authored
ref(solidstart): Adjust event mechanism in withServerActionInstrumentation (#17637)
mechanism type now follows the trace origin naming scheme closes #17638
1 parent 1834094 commit 702cc87

File tree

7 files changed

+9
-6
lines changed

7 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- ref(remix): Adjust event mechanism of `captureRemixServerException` ([#17629](https://github.com/getsentry/sentry-javascript/pull/17629))
3535
- ref(replay-internal): Add mechanism to error caught by `replayIntegration` in debug mode ([#17606](https://github.com/getsentry/sentry-javascript/pull/17606))
3636
- ref(solid): Add `mechanism` to error captured by `withSentryErrorBoundary` ([#17607](https://github.com/getsentry/sentry-javascript/pull/17607))
37+
- ref(solidstart): Adjust event mechanism in withServerActionInstrumentation ([#17637](https://github.com/getsentry/sentry-javascript/pull/17637))
3738
- ref(sveltekit): Adjust `mechanism` of error events ([#17646](https://github.com/getsentry/sentry-javascript/pull/17646))
3839
- ref(vue): Adjust mechanism in Vue error handler ([#17647](https://github.com/getsentry/sentry-javascript/pull/17647))
3940

dev-packages/e2e-tests/test-applications/solidstart-dynamic-import/tests/errors.server.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test.describe('server-side errors', () => {
1818
type: 'Error',
1919
value: 'Error thrown from Solid Start E2E test app server route',
2020
mechanism: {
21-
type: 'solidstart',
21+
type: 'auto.function.solidstart',
2222
handled: false,
2323
},
2424
},

dev-packages/e2e-tests/test-applications/solidstart-spa/tests/errors.server.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test.describe('server-side errors', () => {
1818
type: 'Error',
1919
value: 'Error thrown from Solid Start E2E test app server route',
2020
mechanism: {
21-
type: 'solidstart',
21+
type: 'auto.function.solidstart',
2222
handled: false,
2323
},
2424
},

dev-packages/e2e-tests/test-applications/solidstart-top-level-import/tests/errors.server.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test.describe('server-side errors', () => {
1818
type: 'Error',
1919
value: 'Error thrown from Solid Start E2E test app server route',
2020
mechanism: {
21-
type: 'solidstart',
21+
type: 'auto.function.solidstart',
2222
handled: false,
2323
},
2424
},

dev-packages/e2e-tests/test-applications/solidstart/tests/errors.server.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test.describe('server-side errors', () => {
1818
type: 'Error',
1919
value: 'Error thrown from Solid Start E2E test app server route',
2020
mechanism: {
21-
type: 'solidstart',
21+
type: 'auto.function.solidstart',
2222
handled: false,
2323
},
2424
},

packages/solidstart/src/server/withServerActionInstrumentation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export async function withServerActionInstrumentation<A extends (...args: unknow
4848
captureException(error, {
4949
mechanism: {
5050
handled: false,
51-
type: 'solidstart',
51+
type: 'auto.function.solidstart',
5252
},
5353
});
5454
}

packages/solidstart/test/server/withServerActionInstrumentation.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ describe('withServerActionInstrumentation', () => {
7474
await expect(res).rejects.toThrow();
7575

7676
expect(mockCaptureException).toHaveBeenCalledTimes(1);
77-
expect(mockCaptureException).toHaveBeenCalledWith(error, { mechanism: { handled: false, type: 'solidstart' } });
77+
expect(mockCaptureException).toHaveBeenCalledWith(error, {
78+
mechanism: { handled: false, type: 'auto.function.solidstart' },
79+
});
7880
});
7981

8082
it("doesn't call captureException for thrown redirects", async () => {

0 commit comments

Comments
 (0)