You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(solid): Remove need to pass router hooks to solid integration (#12617)
⚠️ This PR introduces **breaking changes** to `@sentry/solid`⚠️
Previously, we had to pass `useBeforeLeave` and `useLocation` to
`solidRouterBrowserTracingIntegration`. This has now been removed in
favor of importing the router hooks directly within the sdk as needed.
Import `solidRouterBrowserTracingIntegration` from
`@sentry/solid/solidrouter` and add it to `Sentry.init`:
```js
import * as Sentry from '@sentry/solid';
import { solidRouterBrowserTracingIntegration, withSentryRouterRouting } from '@sentry/solid/solidrouter';
import { Router } from '@solidjs/router';
Sentry.init({
dsn: '__PUBLIC_DSN__',
integrations: [solidRouterBrowserTracingIntegration()],
tracesSampleRate: 1.0, // Capture 100% of the transactions
});
const SentryRouter = withSentryRouterRouting(Router);
```
As a result, the SDK has an optional peer dependency on
`@solidjs/router` `v0.13.4+` when using
`solidRouterBrowserTracingIntegration`.
**Note to maintainers**
This package outputs types at the `build` root instead of `build/types`
to better support projects that don't use `moduleResolution: "bundler"`.
---------
Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
Co-authored-by: Luca Forstner <luca.forstner@sentry.io>
0 commit comments