Remix

Learn how to set up and configure Sentry in your Remix application using the installation wizard, capture your first errors, and view them in Sentry.

You need:

  • A Sentry account and project
  • Your application up and running
  • Remix version 2.0.0+

To install Sentry using the installation wizard, run the following command within your project:

Copied
npx @sentry/wizard@latest -i remix

The wizard then guides you through the setup process, asking you to enable additional (optional) Sentry features for your application beyond error monitoring.

Want to learn more about these features?
  • Issues (always enabled): Sentry's core error monitoring product that automatically reports errors, uncaught exceptions, and unhandled rejections. If you have something that looks like an exception, Sentry can capture it.
  • Tracing: Track software performance while seeing the impact of errors across multiple systems. For example, distributed tracing allows you to follow a request from the frontend to the backend and back.
  • Session Replay: Get to the root cause of an issue faster by viewing a video-like reproduction of what was happening in the user's browser before, during, and after the problem.

This guide assumes that you enable all features and allow the wizard to create an example page. You can add or remove features at any time, but setting them up now will save you the effort of configuring them manually later.

What does the installation wizard change inside your application?
  • Creates or updates entry.(client|server).tsx to initialize the SDK
  • Creates .env.sentry-build-plugin with an auth token to upload source maps (this file is automatically added to .gitignore)
  • Updates your build script or Vite configuration to automatically upload source maps to Sentry
  • Instruments your application to support Remix v2 features if you use Remix future flags
  • Adds an example page to your application to help verify your Sentry setup

If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page created by the installation wizard:

  1. Open the example page /sentry-example-page in your browser. For most Remix applications, this will be at localhost.
  2. Click the "Throw Sample Error" button to trigger a frontend error and trace.

Now, head over to your project on Sentry.io to view the collected data (it takes a couple of moments for the data to appear).

Need help locating the captured errors in your Sentry project?
  1. Open the Issues page and select an error from the issues list to view the full details and context of this error. For an interactive UI walkthrough, click here.
  2. Open the Traces page and select a trace to reveal more information about each span, its duration, and any errors. For an interactive UI walkthrough, click here.
  3. Open the Replays page and select an entry from the list to get a detailed view where you can replay the interaction and get more information to help you troubleshoot.

At this point, you should have integrated Sentry into your Remix application and should already be sending error and performance data to your Sentry project.

Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are:

Are you having problems setting up the SDK?
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").