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

# Sentry

> Connect Sentry to provide your errors and exceptions as context to Struct.

Connect Sentry so Struct Agent can use errors, stack traces and affected-user context in investigations. Inspect the existing connection and select the intended Sentry organization.

## Inspect access and existing connections

Use a claimed workspace with permission to configure connections.

```bash theme={null}
struct whoami --json
struct connections catalog sentry --json
struct connections list --json
```

Use the catalog's current fields, choices and permission requirements. Reuse an existing healthy connection instead of creating a duplicate.

## Connect with the CLI

Relay the `waiting_for_human` URL immediately while reading JSON Lines. The person approves the intended provider account in a browser signed in to Struct as the CLI user.

Replace example values with the intended resource:

```bash theme={null}
struct connect sentry --no-browser --json
```

Use `struct sentry orgs --json` to inspect organizations and `struct sentry set-org SLUG` to select the intended one. Connecting a Sentry account does not prove that an alert has been investigated.

## Verify and recover

Use the returned connection ID:

```bash theme={null}
struct connections show CONNECTION_ID --json
struct connections test CONNECTION_ID --json
```

Inspect `ok`, `health` and missing permissions, not only the exit code. `struct connections grant-command CONNECTION_ID` prints repair instructions where supported; have an authorized operator apply them. For expired OAuth links, start the connection command again and use the new link. Do not reconnect to a different account silently.

Verify a bounded operation for the requested job. Connection health proves checked access; it does not prove telemetry arrival, an investigation or alert delivery.

## What Struct reads

* Stack traces, to find the exact code path.
* Breadcrumbs, to reconstruct what led to the error.
* Error frequency and affected users, to judge whether this is new and how bad it is.

## Permissions

Struct's Sentry connection needs the OAuth scopes `org:read`, `project:read`, `event:read`, `alerts:read`, `alerts:write`. Scopes are fixed when you connect, so a missing scope means reconnecting Sentry from Connections.

### Errors and monitor reads

Read your organization, projects, errors and existing alerts.

| Scope | Used for |
| - | - |
| `org:read` | Your organization and its projects |
| `project:read` | Project settings |
| `event:read` | Issues, events and stack traces |
| `alerts:read` | Existing alert rules |

### Manage monitoring

Create and maintain the alerts Struct manages.

Scopes: `alerts:write`.

### Alert delivery setup

A one-time approval that creates the internal integration named Struct AutoMonitors, which delivers alerts from Struct's monitors back to Struct. The elevated token is not stored.

Scopes: `org:write`.

### How to grant

**Reconnect Sentry.** In Struct, open Connections → Sentry → Reconnect and authorize as a Sentry user whose organization role can edit alerts (Owner or Manager, or a Member when the organization lets members edit alerts).

Permission catalog version `2026-11-04.1`. See [permission changes](https://docs.struct.ai/reference/permission-changes.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.