Merged
Conversation
This was referenced Apr 26, 2024
Lms24
commented
Apr 26, 2024
|
|
||
| export declare const metrics: typeof clientSdk.metrics & typeof serverSdk.metrics; | ||
|
|
||
| export declare function trackComponent(options: clientSdk.TrackingOptions): ReturnType<typeof clientSdk.trackComponent>; |
Member
Author
There was a problem hiding this comment.
Isomorphic type definition. This function no-ops on the server, so we can safely take the client-side types here.
mydea
reviewed
Apr 26, 2024
| }, | ||
| "dependencies": { | ||
| "@sentry/sveltekit": "latest || *", | ||
| "@spotlightjs/spotlight": "2.0.0-alpha.1" |
Member
There was a problem hiding this comment.
just to clarify, to we want to leave this in here?
Member
Author
There was a problem hiding this comment.
yeah I think it doesn't hurt and it helped with local inspection of envelope payloads.
AbhiPrasad
approved these changes
Apr 26, 2024
lforst
approved these changes
Apr 26, 2024
This was referenced Apr 26, 2024
Lms24
added a commit
that referenced
this pull request
Apr 26, 2024
In #11807 I added a SvelteKit+Svelte 5 E2E test. Let's also add a small Svelte 5 standalone/SPA app ensure we cover such apps as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates our Svelte and SvelteKit SDKs to support Svelte 5 (tested with latest Svelte 5 preview version).
Concrete changes and adjustments:
current_componentimport from Svelte SDKtrackComponentfunction, due to the export no longer being available in Svelte 5trackComponentutility can no longer auto-obtain the component name. Instead, a component name needs to be provided when calling the function or it falls back to a default const name.trackComponentutility to the Server-side of the SvelteKit SDK. Component tracking doesn't make much sense in SSR but only in client-side hydration and subsequent navigations. With this change, users can now manually calltrackComponentwithin their pages/components.sentrySvelteKitvite plugin. This is much better DX than making thewithSentryConfigwrapper work with SvelteKit apps. We can do this at any point in time, I opened Add SvelteKit component tracking auto instrumentation #11808 to track it.svelte@5.xwhenever it's released. I don't think we should add the preview versions here but happy to change/remove for now if reviewers prefer.closes #10275
closes #10318