OpenSRE queries Sentry to retrieve recent issues, error events, and stack traces — correlating application errors with infrastructure alerts to identify root causes faster.Documentation Index
Fetch the complete documentation index at: https://opensre.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Sentry account with at least one organization
- Auth token with
event:readscope
Setup
Option 1: Interactive CLI
Option 2: Environment variables
Add to your.env:
| Variable | Default | Description |
|---|---|---|
SENTRY_ORG_SLUG | — | Required. Your Sentry organization slug |
SENTRY_AUTH_TOKEN | — | Required. Sentry auth token with event:read |
SENTRY_URL | https://sentry.io | Override for self-hosted Sentry |
SENTRY_PROJECT_SLUG | — | Scope queries to a specific project |
Option 3: Persistent store
Creating an auth token
Recommended: Organization Token- In Sentry, go to Settings → Developer Settings → Organization Tokens
- Click Create New Token
- Enable the
event:readscope - Copy the token
The organization slug appears in your Sentry URL:
https://sentry.io/organizations/<slug>/Verify
Troubleshooting
| Symptom | Fix |
|---|---|
| 403 Forbidden | Ensure the token has event:read scope |
| Organization not found | Verify SENTRY_ORG_SLUG matches the slug in your Sentry URL |
| Connection refused | Check SENTRY_URL for self-hosted instances |
| No issues returned | Normal if no issues exist in the time window — check SENTRY_PROJECT_SLUG |
Security best practices
- Use an Organization Token with only
event:read— do not use admin tokens. - Store the token in
.env, not in source code. - Rotate tokens periodically.
Tracer