Monitor Your App With Sentry

As you develop and deploy your application to users, the importance of robust monitoring becomes crucial. Wix can send monitoring data to your Sentry account, allowing you to effectively track and fix errors in your app. By setting up Sentry and connecting it to your app, you'll gain valuable, out-of-the-box insights into your app's health and comprehensive error reporting across the various Wix platforms.

Learn more about Sentry and how to maximize its capabilities.

This article will guide you through the process of creating a monitoring extension for your app that integrates with Sentry using your Sentry DSN (Data Source Name) and the Wix JavaScript SDK.

Important: Before making calls to the methods defined below using this solution, make sure you have the latest version of @wix/essentials and the Wix CLI installed.

Step 1 | Get a Sentry DSN

  1. Go to the Sentry website and create an account if you haven’t already.
  2. Create a new project. Selecting the platform that aligns with your app’s stack.
  3. Collect the project's DSN key. You'll need the DSN key to connect your app to Sentry.

Step 2 | Configure your app

  1. Enable the monitoring feature through Wix CLI by adding the following to your wix.config.json file.
Copy

When you save your changes, a monitoring extension is automatically added to your app.

  1. To preview your changes, run the following command using npm or yarn:

    npm

    Copy

    yarn

    Copy

Note that when Wix recognizes the changes to your wix.config.json file, Wix will report unhandled errors to your Sentry project automatically. You can also report errors directly in your code:

Step 3 | Monitor in the Sentry dashboard

Access your Sentry dashboard to observe logged errors and monitor app performance for real-time insights and debugging.

Regularly check your Sentry dashboard to monitor errors, performance, and gain insights into your application’s health and issues. Leverage features such as issue tracking, release tracking, and performance monitoring to continuously improve your application.

Supported Wix CLI Extensions

The monitoring solution is available for the following types of app extensions:

Dashboard Extensions

Site Extensions

Backend Extensions

Best practices

See also

Did this help?