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

feat(SvelteKit): Added Spotlight option in server config #546

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

Shubhdeep12
Copy link
Contributor

added comment to add spotlight in Sentry.init for svelteKit server hooks config

Note: We did not include the installation and setup of Spotlight because it is not added by default, and it is also not mandatory.

#535

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! So there's a second part to this but I'm afraid it's not super trivial. We only add the Sentry.init call from templates.ts if there's no prior hooks.server.ts file. In case there is, we try and add our Sentry code to the existing code using AST manipulation.

I briefly tried adding a comment into the init call options object but it completely messed up file formatting. So for now, let's just go with this in the template. We can revisit this later.

Long term, I'd like to streamline of our AST manipulation tools and remove magicast in favour of directly using recast. This should give us more freedom to make such changes ideally.

@Lms24 Lms24 merged commit e3f48b6 into getsentry:master Mar 11, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants