|
4 | 4 |
|
5 | 5 | - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
|
6 | 6 |
|
| 7 | +## 7.59.0 |
| 8 | + |
| 9 | +### Important Changes |
| 10 | + |
| 11 | +- **- feat(remix): Add Remix v2 support (#8415)** |
| 12 | + |
| 13 | +This release adds support for Remix v2 future flags, in particular for new error handling utilities of Remix v2. We heavily recommend you switch to using `v2_errorBoundary` future flag to get the best error handling experience with Sentry. |
| 14 | + |
| 15 | +To capture errors from [v2 client-side ErrorBoundary](https://remix.run/docs/en/main/route/error-boundary-v2), you should define your own `ErrorBoundary` in `root.tsx` and use `Sentry.captureRemixErrorBoundaryError` helper to capture the error. |
| 16 | + |
| 17 | +```typescript |
| 18 | +// root.tsx |
| 19 | +import { captureRemixErrorBoundaryError } from "@sentry/remix"; |
| 20 | + |
| 21 | +export const ErrorBoundary: V2_ErrorBoundaryComponent = () => { |
| 22 | + const error = useRouteError(); |
| 23 | + |
| 24 | + captureRemixErrorBoundaryError(error); |
| 25 | + |
| 26 | + return <div> ... </div>; |
| 27 | +}; |
| 28 | +``` |
| 29 | + |
| 30 | +For server-side errors, define a [`handleError`](https://remix.run/docs/en/main/file-conventions/entry.server#handleerror) function in your server entry point and use the `Sentry.captureRemixServerException` helper to capture the error. |
| 31 | + |
| 32 | +```ts |
| 33 | +// entry.server.tsx |
| 34 | +export function handleError( |
| 35 | + error: unknown, |
| 36 | + { request }: DataFunctionArgs |
| 37 | +): void { |
| 38 | + if (error instanceof Error) { |
| 39 | + Sentry.captureRemixServerException(error, "remix.server", request); |
| 40 | + } else { |
| 41 | + // Optionally capture non-Error objects |
| 42 | + Sentry.captureException(error); |
| 43 | + } |
| 44 | +} |
| 45 | +``` |
| 46 | + |
| 47 | +For more details, see the Sentry [Remix SDK](https://docs.sentry.io/platforms/javascript/guides/remix/) documentation. |
| 48 | + |
| 49 | +### Other Changes |
| 50 | + |
| 51 | +- feat(core): Add `ModuleMetadata` integration (#8475) |
| 52 | +- feat(core): Allow multiplexed transport to send to multiple releases (#8559) |
| 53 | +- feat(tracing): Add more network timings to http calls (#8540) |
| 54 | +- feat(tracing): Bring http timings out of experiment (#8563) |
| 55 | +- fix(nextjs): Avoid importing `SentryWebpackPlugin` in dev mode (#8557) |
| 56 | +- fix(otel): Use `HTTP_URL` attribute for client requests (#8539) |
| 57 | +- fix(replay): Better session storage check (#8547) |
| 58 | +- fix(replay): Handle errors in `beforeAddRecordingEvent` callback (#8548) |
| 59 | +- fix(tracing): Improve network.protocol.version (#8502) |
| 60 | + |
7 | 61 | ## 7.58.1
|
8 | 62 |
|
9 | 63 | - fix(node): Set propagation context even when tracingOptions are not defined (#8517)
|
|
0 commit comments