Skip to main content

Overview

OpenSRE queries Sentry for recent issues, error events, and stack traces so investigations can correlate application errors with infrastructure alerts. This page covers the REST Sentry integration. For the broader MCP surface (Seer, traces, replays, and more), see Sentry (MCP).

Prerequisites

  • Sentry account with at least one organization
  • Auth token with event:read scope (Issues lookup)
  • For uptime watching: also alerts:read (or org:read) so opensre sentry uptime can list monitors

Setup

Option 1: Interactive CLI

Provide your organization slug and auth token when prompted.

Option 2: Environment variables

A search returns up to 100 issues per query (Sentry’s maximum page size) within the SENTRY_STATS_PERIOD window. Widen the window (for example SENTRY_STATS_PERIOD=14d) to surface older issues. If you expect more issues than appear, the cause is usually the time window or a SENTRY_PROJECT_SLUG scope — not a hard cap of one page forever.

Option 3: Persistent store

Credentials

Recommended: Organization Token
  1. In Sentry, go to SettingsDeveloper SettingsOrganization Tokens
  2. Click Create New Token
  3. Enable the event:read scope (and alerts:read if you use uptime watch)
  4. Copy the token
Alternative: Internal Integration For broader access, create an Internal Integration under SettingsDeveloper SettingsInternal Integrations.
The organization slug appears in your Sentry URL: https://sentry.io/organizations/<slug>/

Investigation tools

Verify

Expected output:
The count reflects issues seen in the last 7 days (capped at 100, shown as 100+ when it saturates). Use search_sentry_issues during an investigation to enumerate issues over a custom window.

Troubleshooting

Security

  • Use an Organization Token with only event:read (plus alerts:read if needed) — not an admin token.
  • Store the token in .env or your secret manager — not in source control.
  • Rotate tokens periodically.

Extras

Morning digest (scheduled)

Deliver a daily unresolved-issues summary to Slack, Telegram, or Rocket.Chat. This uses the headless sentry-summary skill path (tools + LLM via the gateway), not the investigation pipeline or generic opensre cron kinds. When an uptime watch schedule is running, the skill also calls get_sentry_uptime_digest to include downtime/recovery context. Example — weekdays at 08:00 London time to Telegram:
Example — Slack channel (C… member/channel id):
Example — Rocket.Chat (requires token credentials — see Rocket.Chat; an incoming webhook alone cannot target an explicit --chat-id):
Optional --project my-service scopes the digest to one Sentry project. When an uptime watch schedule is running, the digest includes an Uptime / downtime (last 24h) section. If no uptime watch history exists, the digest stays Issues-only. The gateway daemon picks up scheduled digests when it is running. If the LLM is unavailable, the run fails with an error.

Uptime watch (downtime notifications)

Poll Sentry uptime monitors (Alerts / Uptime — not the Issues digest) and ping Slack, Telegram, or Rocket.Chat only when a monitor transitions to down or recovered. Quiet polls deliver nothing. Example — poll every 5 minutes and ping Slack on transitions:
Requires alerts:read (or equivalent) on the Sentry token. list_sentry_uptime_alerts exposes the same monitor list in chat/investigation. Schedule an uptime watch alongside the morning digest so sentry-summary can include yesterday’s downtime summary via get_sentry_uptime_digest. Follow-ups (not in v1): inbound Sentry webhooks and auto-remediation attempts.

Telemetry knobs (OpenSRE error reporting)

These control OpenSRE’s own Sentry error reporting — separate from the Issues integration above. Send one test event:
For a custom or self-hosted project:
The event is synthetic and tagged debug=true. If telemetry is disabled, the command exits non-zero without sending anything.