# Sentry

> Connect Sentry to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Sentry integration.

[Sentry](https://sentry.io) is an application monitoring platform that helps developers identify and fix issues in real-time. With Sentry's AI monitoring capabilities, you can track LLM performance and errors.

## Step 1: Get your Sentry OTLP endpoint and DSN

In Sentry, navigate to your project's SDK setup:

1. Log in to your Sentry account
2. Go to **Settings > Projects > \[Your Project] > SDK Setup > Client Keys (DSN)**
3. Click on the **OpenTelemetry** tab
4. Copy the **OTLP Traces Endpoint** URL (ends with `/v1/traces`)
5. Copy your **DSN** from the same page

## Step 2: Enable Broadcast in OpenRouter

Go to [Settings > Broadcast](https://openrouter.ai/settings/broadcast) and toggle **Enable Broadcast**.

![Enable Broadcast](https://files.buildwithfern.com/openrouter.docs.buildwithfern.com/docs/7386b119bd35a485ec53b6f15e3dfe3a980fc5bf61a573256e27ae607ef5614a/content/pages/features/broadcast/broadcast-enable.png)

## Step 3: Configure Sentry

Click the edit icon next to **Sentry** and enter:

* **OTLP Traces Endpoint**: The OTLP endpoint URL from Sentry (e.g., `https://o123.ingest.us.sentry.io/api/456/integration/otlp/v1/traces`)
* **Sentry DSN**: Your Sentry DSN (e.g., `https://abc123@o123.ingest.us.sentry.io/456`)

## Step 4: Test and save

Click **Test Connection** to verify the setup. The configuration only saves if the test passes.

## Step 5: Send a test trace

Make an API request through OpenRouter and view the trace in Sentry's
Performance or Traces view.

![Sentry Trace View](https://files.buildwithfern.com/openrouter.docs.buildwithfern.com/docs/56b7ddbbef77c96471b25b6e468e6327816ffacd355d4671ec2d20a5b0564a8e/content/pages/features/broadcast/broadcast-sentry-trace.png)

<Tip>
  Sentry uses OpenTelemetry for trace ingestion. The OTLP endpoint and DSN
  are both required for proper authentication and trace routing.
</Tip>