Skip to content

7.59.0

Compare
Choose a tag to compare
@getsentry-bot getsentry-bot released this 17 Jul 19:58

Important Changes

  • feat(remix): Add Remix v2 support (#8415)

This release adds support for Remix v2 future flags, in particular for the new error handling utilities of Remix v2. We recommend you switch to using v2_errorBoundary future flag to get the best error handling experience with Sentry.

To capture errors from v2 client-side ErrorBoundary, you should define your own ErrorBoundary in root.tsx and use Sentry.captureRemixErrorBoundaryError helper to capture the error.

// root.tsx
import { captureRemixErrorBoundaryError } from "@sentry/remix";

export const ErrorBoundary: V2_ErrorBoundaryComponent = () => {
  const error = useRouteError();

  captureRemixErrorBoundaryError(error);

  return <div> ... </div>;
};

For server-side errors, define a handleError function in your server entry point and use the Sentry.captureRemixServerException helper to capture the error.

// entry.server.tsx
export function handleError(
  error: unknown,
  { request }: DataFunctionArgs
): void {
  if (error instanceof Error) {
    Sentry.captureRemixServerException(error, "remix.server", request);
  } else {
    // Optionally capture non-Error objects
    Sentry.captureException(error);
  }
}

For more details, see the Sentry Remix SDK documentation.

Other Changes

  • feat(core): Add ModuleMetadata integration (#8475)
  • feat(core): Allow multiplexed transport to send to multiple releases (#8559)
  • feat(tracing): Add more network timings to http calls (#8540)
  • feat(tracing): Bring http timings out of experiment (#8563)
  • fix(nextjs): Avoid importing SentryWebpackPlugin in dev mode (#8557)
  • fix(otel): Use HTTP_URL attribute for client requests (#8539)
  • fix(replay): Better session storage check (#8547)
  • fix(replay): Handle errors in beforeAddRecordingEvent callback (#8548)
  • fix(tracing): Improve network.protocol.version (#8502)

Bundle size 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.95 KB
@sentry/browser - ES5 CDN Bundle (minified) 69.13 KB
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 20.28 KB
@sentry/browser - ES6 CDN Bundle (minified) 60.38 KB
@sentry/browser - Webpack (gzipped + minified) 21.9 KB
@sentry/browser - Webpack (minified) 71.51 KB
@sentry/react - Webpack (gzipped + minified) 21.92 KB
@sentry/nextjs Client - Webpack (gzipped + minified) 50.76 KB
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 30.33 KB
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 28.2 KB
@sentry/replay ES6 CDN Bundle (gzipped + minified) 49.44 KB
@sentry/replay - Webpack (gzipped + minified) 43.16 KB
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 69.56 KB
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 61.83 KB