---
title: "Sentry"
description: "Set up Sentry for errors, logs, replays, feedback, alerts and uptime: the account and its data region, the project, the DSN for the app and the deployment, source maps, cron monitors, the alert rules and the health monitor."
canonical_url: "https://nuxt-backend.dev/docs/services/sentry"
---
# Sentry

> Set up Sentry for errors, logs, replays, feedback, alerts and uptime: the account and its data region, the project, the DSN for the app and the deployment, source maps, cron monitors, the alert rules and the health monitor.

Version: nuxt-backend 0.6.x · Tab: Services · Kind: how-to · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

Sentry collects errors and log lines from the browser, the Nuxt server and the backend's actions, replays what led to an error for visitors who allowed it, takes feedback, watches the backend's crons, receives the backend's alerts, and checks that the app is up. It is optional. Turn it on before launch.

<table>
<thead>
  <tr>
    <th>
      You need
    </th>
    
    <th>
      Time
    </th>
    
    <th>
      Cost to start
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      A Sentry account
    </td>
    
    <td>
      15 minutes
    </td>
    
    <td>
      Free for one person: 5,000 errors a month
    </td>
  </tr>
</tbody>
</table>

## What it powers

<table>
<thead>
  <tr>
    <th>
      Capability
    </th>
    
    <th>
      What Sentry gives
    </th>
    
    <th>
      Pages
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        monitoring
      </code>
    </td>
    
    <td>
      Error reports from every side, tagged with the function and the error code
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring">
        Monitor errors and uptime
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        monitoring
      </code>
    </td>
    
    <td>
      Cron monitors: the backend's maintenance pass, and the jobs you check in
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring#check-jobs-in">
        Check jobs in
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        monitoring
      </code>
    </td>
    
    <td>
      Log lines, session replay after consent and the feedback widget, with personal data scrubbed
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring#what-the-preset-does">
        What the preset does
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        monitoring
      </code>
    </td>
    
    <td>
      The backend's alerts: the email quota and the day's AI spend
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring#alerts">
        Alerts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        monitoring
      </code>
    </td>
    
    <td>
      An uptime check on the health endpoint
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring#the-health-endpoint">
        The health endpoint
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        jobs
      </code>
    </td>
    
    <td>
      The backend's own exception reports, through Convex's integration on Professional
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/build/data/jobs">
        Background work
      </a>
    </td>
  </tr>
</tbody>
</table>

Without a DSN in development, the dev server keeps a local error log that DevTools lists, so you see the same reports before you sign up.

## Create the account

<steps level="3">

### Sign up and pick the data region

At [sentry.io/signup](https://sentry.io/signup), create an organization. Choose where its data lives, the US (Iowa) or the EU (Frankfurt), at that step: the choice is final, and moving means a new organization ([Data storage location](https://docs.sentry.io/organization/data-storage-location/)).

### Create the project

**Projects**, **Create Project**, platform **Nuxt**. One project serves the app and the backend: each report carries `backend.source` (`browser`, `server` or `backend`) to tell them apart.

### Copy the DSN

**Project Settings**, **Client Keys (DSN)**. The DSN is public by design: it lets a client send reports, nothing more.

### Install the SDK

```bash
npm install @sentry/nuxt
```

The module wires it once a build sees a DSN. Skip Sentry's setup wizard: the package passes the SDK its own config files, and a `sentry.client.config.ts` of yours replaces the package's whole ([Customize the SDK](https://nuxt-backend.dev/docs/ship/operate/monitoring#customize-the-sdk)).

</steps>

**Who should own it.** The person on call owns the organization and its alert rules. On the free plan the organization holds one person; Team adds as many as you need.

## Sandbox and test mode

Sentry has no test mode. Every report names the deployment's `BACKEND_ENVIRONMENT` as its environment, so one alert rule scoped to `production` ignores the rest:

<table>
<thead>
  <tr>
    <th>
      <code>
        BACKEND_ENVIRONMENT
      </code>
    </th>
    
    <th>
      Reports
    </th>
    
    <th>
      Cron check-ins
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        development
      </code>
    </td>
    
    <td>
      The local error log, or Sentry once a DSN is set
    </td>
    
    <td>
      No
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        preview
      </code>
    </td>
    
    <td>
      Sentry, under <code>
        preview
      </code>
    </td>
    
    <td>
      No
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        sandbox
      </code>
    </td>
    
    <td>
      Sentry, under <code>
        sandbox
      </code>
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        production
      </code>
    </td>
    
    <td>
      Sentry, under <code>
        production
      </code>
    </td>
    
    <td>
      Yes
    </td>
  </tr>
</tbody>
</table>

A dev deployment that sleeps with a laptop, or a preview deleted with its branch, would read as a missed run, so only `sandbox` and `production` check in.

## Keys and environment

<table>
<thead>
  <tr>
    <th>
      Variable
    </th>
    
    <th>
      Where to find it
    </th>
    
    <th>
      Dev
    </th>
    
    <th>
      Prod
    </th>
    
    <th>
      Secret
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        MONITORING_DSN
      </code>
    </td>
    
    <td>
      <strong>
        Project Settings
      </strong>
      
      , <strong>
        Client Keys (DSN)
      </strong>
    </td>
    
    <td>
      Optional
    </td>
    
    <td>
      On the Convex deployment, and in the app host's env
    </td>
    
    <td>
      No
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        SENTRY_AUTH_TOKEN
      </code>
    </td>
    
    <td>
      <strong>
        Settings
      </strong>
      
      , <strong>
        Auth Tokens
      </strong>
      
      , or set by Sentry's Vercel integration
    </td>
    
    <td>
      Not needed
    </td>
    
    <td>
      In the app host's build env, to upload source maps
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        SENTRY_ORG
      </code>
      
      , <code>
        SENTRY_PROJECT
      </code>
    </td>
    
    <td>
      The organization's and the project's slugs, or set by the integration
    </td>
    
    <td>
      Not needed
    </td>
    
    <td>
      In the app host's build env
    </td>
    
    <td>
      No
    </td>
  </tr>
</tbody>
</table>

Sentry's Vercel integration sets the three source-map names, and the DSN as `NEXT_PUBLIC_SENTRY_DSN`, a name meant for Next.js ([Vercel integration](https://docs.sentry.io/organization/integrations/deployment/vercel/)). The package reads it as it is: the app reports to it when `MONITORING_DSN` is unset, and `npx nuxt-backend env push` forwards it to the deployment as `MONITORING_DSN` (after `vercel env pull .env.local`), so the integration alone is enough. Set `MONITORING_DSN` yourself to report to another project.

## Link it

<steps level="3">

### Give the deployment the DSN

```bash
npx convex env set --prod MONITORING_DSN
```

It asks for the value. `env push --prod` forwards it from `.env.local` instead, when you keep it there.

### Give the app the DSN

Add `MONITORING_DSN` to the host's production env. On Vercel, also install Sentry's integration from the Vercel Marketplace and link it to the project, for source maps and releases.

The browser sends its reports through Sentry's managed tunnel: a path on the app's own origin, derived from the DSN, which the Nuxt server forwards to Sentry. Ad blockers don't drop them, and the app's [Content Security Policy](https://nuxt-backend.dev/docs/ship/security#content-security-policy) lets them out with nothing to configure. With `@sentry/nuxt` before 11.10, or [a Sentry config of your own](https://nuxt-backend.dev/docs/ship/operate/monitoring#customize-the-sdk), the browser may report straight to the ingest, and the module adds this DSN's origin to `connect-src` instead. Through the tunnel, every page view reaches the Nuxt server, a function invocation on Vercel ([What the tunnel costs](https://nuxt-backend.dev/docs/ship/operate/monitoring#what-the-tunnel-costs)).

### Watch the health endpoint

In Sentry, open **Monitors**, **Add Monitor**, **Uptime**. Point it at `https://app.example.com/api/backend/health`, every minute. Sentry opens an issue after three failures in a row ([Uptime monitoring](https://docs.sentry.io/product/monitors-and-alerts/monitors/uptime-monitoring/)).

### Turn on the backend's exception reports

On Convex Professional, open the production deployment's **Settings**, **Integrations**, and add Sentry with a DSN of a **Node.js** project. Convex then reports the exceptions of queries and mutations with their real message, which callers only see as `Server Error` ([Exception reporting](https://docs.convex.dev/production/integrations/exception-reporting)).

</steps>

The backend's maintenance cron creates its own monitor, `backend-maintenance`, on its first check-in.

## Check it

```bash
npx nuxt-backend doctor --only monitoring
```

<table>
<thead>
  <tr>
    <th>
      Finding
    </th>
    
    <th>
      What it checks
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#deployment-monitoring-dsn">
        <code>
          deployment-monitoring-dsn
        </code>
      </a>
    </td>
    
    <td>
      The deployment holds a DSN
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#monitoring-app">
        <code>
          monitoring-app
        </code>
      </a>
    </td>
    
    <td>
      The app has a DSN and the SDK
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#monitoring-source-maps">
        <code>
          monitoring-source-maps
        </code>
      </a>
    </td>
    
    <td>
      A Vercel build will upload its source maps
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#monitoring-backend-exceptions">
        <code>
          monitoring-backend-exceptions
        </code>
      </a>
    </td>
    
    <td>
      A reminder of Convex's exception reporting, which only its dashboard turns on
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#monitoring-health">
        <code>
          monitoring-health
        </code>
      </a>
    </td>
    
    <td>
      Under <code>
        --prod
      </code>
      
      : the live health endpoint answers, and shows no detail to anyone
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli/diagnostics#monitoring-uptime">
        <code>
          monitoring-uptime
        </code>
      </a>
    </td>
    
    <td>
      Under <code>
        --prod
      </code>
      
      , once the endpoint answers: not checked, as doctor reads no Sentry account; it names the URL to watch
    </td>
  </tr>
</tbody>
</table>

## Go to production

<steps level="3">

### Set the DSN on both sides

The deployment and the app host, as in [Link it](#link-it).

### Scope your alerts

Create an alert rule for new issues in the `production` environment, sent where the person on call reads it, and one for issues tagged `backend.alert`: the backend's quota and spend alerts, one issue per kind ([Alerts](https://nuxt-backend.dev/docs/ship/operate/monitoring#alerts)).

### Deploy and check

```bash
npx nuxt-backend doctor --prod
```

</steps>

## Costs and limits

Checked on 2026-10-25 against [Sentry pricing](https://sentry.io/pricing/):

<table>
<thead>
  <tr>
    <th>
      
    </th>
    
    <th>
      Developer
    </th>
    
    <th>
      Team
    </th>
    
    <th>
      Business
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Price
    </td>
    
    <td>
      $0
    </td>
    
    <td>
      $26 a month, billed yearly
    </td>
    
    <td>
      $80 a month, billed yearly
    </td>
  </tr>
  
  <tr>
    <td>
      People
    </td>
    
    <td>
      1
    </td>
    
    <td>
      Unlimited
    </td>
    
    <td>
      Unlimited
    </td>
  </tr>
  
  <tr>
    <td>
      Errors
    </td>
    
    <td>
      5,000 a month
    </td>
    
    <td>
      50,000 a month
    </td>
    
    <td>
      50,000 a month
    </td>
  </tr>
  
  <tr>
    <td>
      Logs
    </td>
    
    <td>
      5 GB
    </td>
    
    <td>
      5 GB
    </td>
    
    <td>
      5 GB
    </td>
  </tr>
  
  <tr>
    <td>
      Session replays
    </td>
    
    <td>
      50
    </td>
    
    <td>
      50
    </td>
    
    <td>
      50
    </td>
  </tr>
  
  <tr>
    <td>
      Cron monitors
    </td>
    
    <td>
      1
    </td>
    
    <td>
      1
    </td>
    
    <td>
      1
    </td>
  </tr>
  
  <tr>
    <td>
      Uptime monitors
    </td>
    
    <td>
      1
    </td>
    
    <td>
      1
    </td>
    
    <td>
      1
    </td>
  </tr>
</tbody>
</table>

- **Cron monitors:** the backend's `backend-maintenance` uses the one included. Each job you check in adds a monitor at $0.78 a month. The backend's alerts are issues, not monitors.
- **Session replays:** the preset sends a replay only once an error happens, and only for visitors who allowed it, so the 50 included go to errors.
- **Logs** cost $0.50 per GB past the 5 GB.
- **Spike protection** stops a flood of one error from eating the month's quota. It is on per project.
- **Past the quota,** Sentry answers `429` and the SDK drops reports. `reportError` never throws for it.

## Data and compliance

- **What it holds:** error messages, stack traces, log lines, feedback, and the URL and browser of each report. The package's preset scrubs personal data before anything leaves (addresses, credentials, secret parameters, cookies, bodies; of a user only the id), and Sentry scrubs common secrets again on its servers by default.
- **Region:** the US or the EU, chosen when you created the organization. Cron check-ins, DSN keys and organization settings stay in the US either way.
- **Session replay** runs only in a browser whose visitor allowed the `replay` purpose, and only when the app lists it: after an error, the minute before it and the rest of that visit, every text, input and image masked. Withdrawing stops it, and what it still held is not sent.
- **Role:** Sentry processes data on your behalf. Accept its [DPA](https://sentry.io/legal/dpa/) in the organization's legal settings; it lists its [subprocessors](https://sentry.io/legal/subprocessors/) and holds SOC 2 Type II ([Security](https://sentry.io/security/)).
- **Erasure:** once an account is deleted, errors stop naming it. The package does not yet delete what Sentry already holds for that person: whether Sentry offers an API for one user's data is still being checked, and until then its retention period removes old events ([Export and delete an account](https://nuxt-backend.dev/docs/build/auth/accounts/data#what-an-erasure-removes)).

Name Sentry in your privacy policy as a processor ([Privacy, GDPR and cookies](https://nuxt-backend.dev/docs/ship/compliance/privacy)). This is not legal advice.

## Related

- [Monitor errors and uptime](https://nuxt-backend.dev/docs/ship/operate/monitoring): what each side reports, and the health endpoint.
- [Respond to incidents](https://nuxt-backend.dev/docs/ship/operate/runbooks): what to do when an alert fires.
- [Vercel](https://nuxt-backend.dev/docs/services/vercel): the host's env, and Sentry's integration.
- [Convex](https://nuxt-backend.dev/docs/services/convex): exception reporting on Professional.
- [Service map](https://nuxt-backend.dev/docs/services): every service, and the order to set them up in.


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
