> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lovable.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your app to Sentry

> Connect your app to Sentry to report browser and server errors and performance data from your Lovable app with a Sentry client key (DSN).

[Sentry](https://sentry.io/) is an error and performance monitoring platform. The Sentry connector lets your Lovable app report errors and performance data with a Sentry client key (DSN). It's designed for apps already running in production, where you need to see failures you cannot reproduce.

| Use | If you want to |
| - | - |
| **App + chat connector** (this page) | Report errors and performance data from your Lovable app with one shared client key (DSN) |
| [Chat connector (MCP server)](https://docs.lovable.dev/integrations/chat-connectors.md) | Let Lovable read your Sentry issues, exceptions, and performance data as context while you build (personal to you) |

With Sentry, your app can:

* Report browser errors to your Sentry project
* Report server errors with the same client key
* Send performance data to your Sentry project

This connector stores one client key (DSN) per connection, and that key appears in your published app. Lovable adds Sentry's reporting code to your app, which sends events directly to Sentry.

## Common use cases and example apps

These examples show what you can build with Sentry, each with a prompt to start from.

| Example app | Example prompt | Description |
| :- | :- | :- |
| **SaaS error tracking** | *Use Sentry and build a SaaS app that reports browser errors when a page fails or a button action fails.* | **See production browser errors in Sentry.** The app sends browser errors to your Sentry project. |
| **API error reporting** | *Use Sentry and build an app that reports server errors when an API route fails.* | **Capture server failures in Sentry.** The app reports errors from server code with the same client key. |
| **Checkout failures** | *Use Sentry and build a checkout flow that reports payment and form errors to Sentry.* | **Find the checkout step that failed.** The app reports payment and form errors to your Sentry project. |
| **Errors some visitors hit** | *Use Sentry and build a signup flow that reports an error when a step fails for some visitors and not others.* | **Find a failure that only some visitors hit.** The app reports that error to your Sentry project so you can see which step failed. |
| **Performance reporting** | *Use Sentry and build an app that reports performance data to Sentry along with errors.* | **Send performance data to Sentry.** The app reports performance data to your Sentry project with the connected client key. |
| **Customer-reported breakage** | *Use Sentry and build a store app that reports the error a customer hits when they say a page failed.* | **Match a customer's report to the error.** The app reports the error to your Sentry project so you can see what that customer hit. |

## How to connect Sentry

Who can create Sentry connections depends on your plan and workspace settings. App + chat connectors are available by default. On Business and Enterprise plans, [Who can create connections and clients](https://docs.lovable.dev/integrations/admin-controls.md#who-can-create-connections-and-clients) starts at **Admins**. Some Enterprise workspaces start at **No one**, which disables the connector. An admin or owner changes it in **Connectors → Admin settings → App + chat connectors**.

You can create multiple Sentry connections using different client keys, which is useful for separating environments (for example, development and production).

When the connection is created, you can [link it to the projects](https://docs.lovable.dev/integrations/app-connectors.md#link-a-connection-to-a-project) where you want to use it. Anyone you share the connection with can ask Lovable in chat to link their project to it. A connection left private can be linked only by you.

### Prerequisites

Before connecting Sentry, make sure you have:

* A Sentry account and a project in that account
* A client key (DSN) for that project
* Permission to **create connections** in your Lovable workspace (see [Who can create connections and clients](https://docs.lovable.dev/integrations/admin-controls.md#who-can-create-connections-and-clients))

> [!NOTE]
>
> Error and performance events your app sends count toward your Sentry plan. Billing and quota are handled directly by Sentry, not Lovable.

### Step 1: Get a Sentry client key (DSN)

A client key (DSN) tells Sentry which project receives events.

To copy a client key:

**1. Sign in to Sentry**

Sign in to [Sentry](https://sentry.io/).

**2. Open project settings**

Go to [Settings → Projects](https://sentry.io/settings/projects/) and open the project you want the app to report to.

**3. Open Client Keys (DSN)**

Open **SDK Setup → Client Keys (DSN)**.

**4. Copy the DSN**

Copy the client key (DSN). The DSN looks like `https://<key>@o<org>.ingest.sentry.io/<project>`. The host varies by region, for example `ingest.us.sentry.io` or `ingest.de.sentry.io`.

> [!WARNING]
>
> Use a client key (DSN), not a Sentry auth token. Auth tokens start with `sntryu_` or `sntrys_` and cannot be saved in this connector. You'll need the DSN in the next step.

See Sentry documentation for more: [Data Source Name (DSN)](https://docs.sentry.io/concepts/key-terms/dsn-explainer/).

### Step 2: Connect Sentry to Lovable

Paste the client key into Lovable. Each connection stores one DSN. You can use that key for browser and server reporting.

**1. Open Sentry in Connectors**

Open [**Connectors**](https://lovable.dev/dashboard?connectors) and select **Sentry**. For the other places to open the catalog from, see [Where to find connectors](https://docs.lovable.dev/integrations/introduction#where-to-find-connectors).

**2. Add a connection**

Click **Connect** on the connector page. The chat connector is under **More options**, labeled **Chat connector**. The form is split into collapsible sections, **Details**, **Configure connection**, and **Sharing**.

**3. Name the connection**

Under **Details**, Lovable fills in a name for the connection, which you can change. The name is only used inside Lovable to identify the connection.

**4. Configure the connection**

Under **Configure connection**, paste the client key into **DSN**. The field is marked **Public** because the value appears in your published app. Lovable masks the value. Click **Show secret** to read it. **Open project settings** opens [Sentry project settings](https://sentry.io/settings/projects/) if you still need to copy the key.

**5. Choose who can use this connection**

Under **Sharing**, the connection is private to you by default and shows a **Private** label. To share it, click **Share with others**. Then add workspace members by email, or click **Invite entire workspace** to make the connection available to everyone in your Lovable workspace.

See [Who can use connections and clients](https://docs.lovable.dev/integrations/admin-controls.md#who-can-use-connections-and-clients) for more information.

**6. Connect**

Click **Connect** at the bottom of the form. Lovable checks the value against the client key format but does not call Sentry, so compare the DSN against your Sentry project before you save.

When connected, anyone building in a project can ask Lovable in chat to link their project to Sentry (based on configured connection-level access). Your Lovable apps can then report errors and performance data to that Sentry project.

## Check that events are arriving

Lovable does not call Sentry when you save the connection. Confirm the events in Sentry after your app is running.

**1. Use your app**

Open your app and trigger an action that should report an error.

**2. Open Issues**

In Sentry, open the project and select **Issues**.

**3. Recheck the DSN if nothing arrives**

If **Issues** stays empty, confirm that the DSN in Lovable matches that project's client key.

## Limitations

The Sentry app + chat connector documented on this page cannot:

* Accept a Sentry auth token (`sntryu_` or `sntrys_`). Use a client key (DSN) only.
* Read issues, exceptions, or performance data from your Sentry account. Use the [chat connector](https://docs.lovable.dev/integrations/chat-connectors.md) for that.
* Call the Sentry API or send events through Lovable's [connector gateway](https://docs.lovable.dev/integrations/app-connectors.md#gateway-based-connectors). Your app sends events directly to Sentry.
* Check the client key when you save the connection. A correctly formatted but wrong DSN saves without an error and events go nowhere.
* Accept a self-hosted Sentry DSN. The value has to be a Sentry cloud client key on `sentry.io`. Regional hosts such as `ingest.us.sentry.io` and `ingest.de.sentry.io` work.
* Support per-end-user Sentry login. Each connection represents a single Sentry project shared across all Lovable projects linked to it.

## Manage your Sentry connection

Connections are managed from [**Connectors**](https://lovable.dev/dashboard?connectors): select **Sentry**, then open the connection.

* **Unlink projects** to remove Sentry access from specific projects while keeping the connection available for others. See [Unlink projects from a connection](https://docs.lovable.dev/integrations/app-connectors.md#unlink-projects-from-a-connection) for the steps.
* **Delete the connection** to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use Sentry stop working until a new connection is added. See [Delete a connection](https://docs.lovable.dev/integrations/app-connectors.md#delete-a-connection) for the steps and who can delete.
