Skip to content

Add SvelteKit client-side error monitoring instrumentation #7402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Lms24 opened this issue Mar 10, 2023 · 2 comments
Closed

Add SvelteKit client-side error monitoring instrumentation #7402

Lms24 opened this issue Mar 10, 2023 · 2 comments
Assignees
Labels
Package: sveltekit Issues related to the Sentry SvelteKit SDK

Comments

@Lms24
Copy link
Member

Lms24 commented Mar 10, 2023

To get error monitoring for the client-side of SvelteKit apps, we need to ensure that all errors are caught:

To wrap the handleError hook, I already created a PoC that we can probably base our implementation on. For now it's enough to export this wrapper to let users add it manually. Later on, we can add auto-wrapping functionality like in NextJS.

### Tasks
- [ ] https://github.com/getsentry/sentry-javascript/pull/7406
- [x] Ensure default integrations capture errors not caught by the `handleError` hook
- [x] [Needs Research] Should we Instrument [`+error.svelte`](https://kit.svelte.dev/docs/routing#error) pages?
@Lms24 Lms24 changed the title Add client-side error monitoring instrumentation Add SvelteKit client-side error monitoring instrumentation Mar 10, 2023
@Lms24 Lms24 added Type: Feature Package: sveltekit Issues related to the Sentry SvelteKit SDK labels Mar 10, 2023
@AbhiPrasad AbhiPrasad self-assigned this Mar 10, 2023
@AbhiPrasad
Copy link
Member

AbhiPrasad commented Mar 10, 2023

I did some testing with Ensure default integrations capture errors not caught by the handleError hook, and since we have functionality in the SDK to avoid double capturing the same error, it seems this should be fine.

@AbhiPrasad
Copy link
Member

Re: the Should we Instrument +error.svelte pages? task, I asked about this here, and from testing internally it might be too noisy. What we probably want to do is only wrap the server-side error helper. Will update #7403 accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: sveltekit Issues related to the Sentry SvelteKit SDK
Projects
None yet
Development

No branches or pull requests

2 participants