Skip to content

Sentry Connection

The Sentry connection integrates your Sentry organization with OpsTower, giving agents the ability to query issues, view error events with full stack traces, analyze error volume trends, and discover projects.

You need a Sentry account with at least one project. Both sentry.io (cloud) and self-hosted Sentry instances are supported.

To set up a Sentry connection, you need the following:

  • Auth Token — an Internal Integration token with read-only permissions
  • Organization Slug — your Sentry organization identifier (found in your Sentry URL)
  • Project Slugs (optional) — comma-separated project slugs to scope queries to specific projects
  1. In Sentry, go to Settings > Developer Settings > Custom Integrations.
  2. Click Create New Integration > Internal Integration.
  3. Give it a name (e.g., “OpsTower Read Only”).
  4. Set permissions to Read for:
    • Organization — to list organization details and stats
    • Project — to list projects and their error events
    • Issue & Event — to list issues and retrieve events with stack traces
  5. Scroll to the bottom and click New Token to generate a token.
  6. Copy the generated token and paste it into OpsTower.

Internal Integration tokens never expire and must be manually revoked.

Your organization slug is the identifier in your Sentry URL:

https://your-org-slug.sentry.io

For example, if your Sentry URL is https://my-startup.sentry.io, your organization slug is my-startup.

  1. In OpsTower, navigate to Connections in the sidebar.
  2. Click Add Connection and select Sentry.
  3. Enter your Auth Token and Organization Slug.
  4. Optionally enter Project Slugs to scope queries (leave blank to search all projects).
  5. Click Test Connection to verify your credentials.
  6. Click Save to create the connection.

Once connected and enabled on an agent, the agent can:

  • Query issues — list grouped errors with severity level, occurrence count, affected users, first/last seen times, and direct links to Sentry
  • Get issue events — retrieve individual error occurrences with full stack traces, exception details, breadcrumbs, and user context
  • Query error stats — analyze error volume trends over time, grouped by outcome (accepted/filtered/rate-limited) or by project
  • List projects — discover all projects in the organization with platform and creation date

Agents are guided to use list_projects first to discover available projects, then query issues sorted by frequency or date to find the most impactful errors.

  • Authentication failed: Verify your auth token is correct and has not been revoked. Ensure the Internal Integration has Read permissions for Organization, Project, and Issue & Event.
  • Organization not found: Double-check your organization slug. It must exactly match the slug in your Sentry URL (lowercase, hyphens allowed).
  • No issues returned: Try broadening your query. The default filter is is:unresolved — use an empty query string to search all statuses. Check that the token has access to the projects you are querying.
  • Rate limited: Sentry applies per-endpoint rate limits. If you see rate limit errors, reduce the frequency of queries. The rate limit headers (X-Sentry-Rate-Limit-Remaining) indicate how many requests remain.