> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Monitor Your CLI App With Sentry ## Article: Monitor Your CLI App With Sentry ## Article Link: https://dev.wix.com/docs/wix-cli/guides/development/app-development/monitor-your-cli-app-with-sentry.md ## Article Content: # Monitor Your CLI App With Sentry As you develop and deploy your CLI application to users, the importance of robust monitoring becomes crucial. Wix can send monitoring data to your [Sentry](https://sentry.io/) 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](https://open.sentry.io/benefits) 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.md and the Wix CLI.
## Step 1 | Get a Sentry DSN 1. Go to the [Sentry website](https://sentry.io/) 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. ```json { "monitoring": { "sentry": { "dsn": "" } } } ``` When you save your changes, a monitoring extension is automatically added to your app. 2. To preview your changes, run the following command using npm or yarn: **npm** ```js npm run dev ``` **yarn** ```js yarn dev ``` 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: - [`captureException()`](https://dev.wix.com/docs/sdk/core-modules/essentials/monitoring.md#capture-exception) - [`captureMessage()`](https://dev.wix.com/docs/sdk/core-modules/essentials/monitoring.md#capture-message) - [`addBreadcrumb()`](https://dev.wix.com/docs/sdk/core-modules/essentials/monitoring.md#add-breadcrumb) - [`startSpan()`](https://dev.wix.com/docs/sdk/core-modules/essentials/monitoring.md#start-span) ## 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 extensions: **Dashboard Extensions** - [Dashboard pages](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/dashboard-extensions/dashboard-pages/add-dashboard-page-extensions-with-the-cli.md) - [Dashboard plugins](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/dashboard-extensions/dashboard-plugins/add-dashboard-plugin-extension-with-the-cli.md) - [Dashboard modals](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/dashboard-extensions/dashboard-modals/add-dashboard-modal-extensions-with-the-cli.md) **Backend Extensions** - [Events](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/backend-extensions/events/add-event-extensions-with-the-cli.md) - [Service plugins](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/backend-extensions/service-plugins/add-service-plugin-extensions-with-the-cli.md) **Site Extensions** - [Embedded scripts](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/site-extensions/embedded-scripts/about-embedded-scripts-and-the-cli.md) - [Site widgets](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/site-extensions/custom-element-site-widgets/add-a-site-widget-extension-in-the-cli.md) - [Site plugins](https://dev.wix.com/docs/wix-cli/legacy-clis/legacy-wix-cli-for-apps/supported-extensions/site-extensions/site-plugins/add-a-site-plugin-extension-in-the-cli.md) ## Best practices - Set up [alerts in Sentry](https://docs.sentry.io/product/alerts/) to notify you of critical failures. - Set up [notifications](https://docs.sentry.io/product/alerts/notifications/) in Sentry. ## See also - [Sentry documentation](https://docs.sentry.io/)