Improved Remix SDK Support

With the 8.10.0 release of our Remix SDK includes improvements to our tracing experience, gives better auto instrumentation for HTTP spans and improved SSR span parent child relationships. So you can get more data and more meaningful insights into your Remix applicaiton.

You can now simplify your server-side remix instrumentation by opting-in like this in your instrument.server.mjs :

const Sentry = require('@sentry/remix');

Sentry.init({
  dsn: YOUR_DSN
  // opt-in to new auto instrumentation
  autoInstrumentRemix: true,
});

With this setup, you do not need to add e.g. wrapExpressCreateRequestHandler anymore. Additionally, the quality of the captured data improves. The old way to use @sentry/remix continues to work, but it is encouraged to use the new setup.

Express server adapter:

  • There is no need to use wrapExpressCreateRequestHandler anymore even if you don't opt-in to autoInstrumentRemix. wrapExpressCreateRequestHandler is kept exported as a no-op function.
  • Built in HTTP incoming request instrumentation for both legacy and OTel implementations. Instead we mark requestHandler spans as the root http.server spans.

When autoInstrumentRemix is set to true, this update replaces:

  • Performance tracing on action / loader / documentRequest functions. Leaving them to be traced by opentelemetry-instrumentation-remix
  • Request handler instrumentation as they are also traced by opentelemetry-instrumentation-remix
  • Auto-instrumentation for http as default integration for Remix SDK.
  • With the new instrumentation, pageload span is the child of the loader span. (Example: Trace)

Fixed Backlogged Issues:

  • Remix request handler build could be a function #12082
  • @sentry/remix fails to propagate trace headers on error boundaries #9737
  • Adding sentry to Remix increases latency by a lot #12285