Skip to content
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

Auto-instrument SvelteKit load functions #7940

Closed
Tracked by #6692
Lms24 opened this issue Apr 24, 2023 · 0 comments · Fixed by #7994
Closed
Tracked by #6692

Auto-instrument SvelteKit load functions #7940

Lms24 opened this issue Apr 24, 2023 · 0 comments · Fixed by #7994
Assignees

Comments

@Lms24
Copy link
Member

Lms24 commented Apr 24, 2023

While we're waiting on sveltejs/kit#9542 to be accepted/implemented, we need to apply the alternative solution in the meantime, as instructing users to manually wrap all load functions is not an acceptable ask for GA.

To add performance instrumentation (and load-specific error catching), the SvelteKit SDK needs to automatically wrap load functions. We opt to do this at build-time rather than via the wizard for the following reasons:

  • A build-time solution will find and wrap (hopefully) all load functions, while users would need to run the wizard every time to wrap newly added load functions
  • A build-time solution doesn't need to be revertible, while the wizard should ideally have a revert command. This is especially important as long-term we want to move away from wrapping load functions directly in favour of a handleLoad hook.
  • While modifying just two hooks files is fine IMO to do via the wizard, touching potentially a lot more files than these two is by far more intrusive and error-prone.

This is in line with the feedback we received in #6692 RE auto-wrapping load functions.

ref #6692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants