HELIOS DOCS

Sentry

The Sentry integration lets Helios agents read and change issues, events, projects, releases, and alerts through Sentry's REST API, and start workflows from supported Sentry webhook events.

What your agents can do

Helios agents call Sentry's REST API using the connected integration's permissions. They can read and update issues, events, projects, releases, and alerts.

  • Find the newest or most frequent issues in a project or release and summarize them
  • Read an issue's events, stack trace, breadcrumbs, and tags, and suggest a fix
  • Resolve, archive, assign, or delete issues, and change their priority
  • Read an issue's comments and reply to them
  • Create releases and deploys, and manage alerts, monitors, projects, and teams

Sentry's published spec doesn't include issue comments, so Helios describes them from Sentry's source. Agents can list and add comments, and change or delete comments that the integration wrote. Agents can only reach the Sentry server set on the connection.

Authentication

MethodTypeDescription
Sentry Auth TokenAPI KeyThe token of an internal integration in your Sentry organization
Your own Sentry OAuth appOAuth 2.0A public integration that you create and install in your organization

See Integration authentication for how credentials are stored and injected.

Both methods have the same prerequisites:

  • Role: you need the Owner role to give the integration every permission below. Sentry doesn't let you give an integration more permissions than your own, and only Owners have Organization: Admin. A Manager can set everything else. Sentry shows an integration's credentials only to Owners and Managers.
  • Plan: Sentry's pricing page lists the API and alerts through integrations on the Team plan and higher. Error webhooks need the Business plan or higher.

Helios calls https://sentry.io by default, which works for organizations in both the US and the EU (DE) region. To use the region's own address or a self-hosted Sentry, fill in Base URL, below the method's fields, when you connect. Enter https://de.sentry.io or your server's address, such as https://sentry.example.com, without /api/0. The address must use https and must not be localhost or a private network address. Leave it empty to use https://sentry.io. To change the base URL later, enter the Auth Token or Client Secret again.

Permissions

Both methods get the permissions you set on the integration in Sentry. Helios doesn't request scopes of its own. Set each permission to the level below, for the operations described below:

PermissionSet toScopesNotes
ProjectAdminproject:read, project:write, project:adminAdmin: deletes projects and their keys, code owners, and service hooks
TeamAdminteam:read, team:write, team:adminAdmin: deletes teams
ReleaseAdminproject:releasesThe only level. Releases, commits, files, and deploys
DistributionReadproject:distributionMobile builds for testers
Issue & EventAdminevent:read, event:write, event:adminAdmin: deletes issues
OrganizationAdminorg:read, org:write, org:admin, org:integrationsAdmin: deletes custom integrations. Only Owners can set it
MemberAdminmember:read, member:write, member:adminAdmin: removes members
AlertsRead & Writealerts:read, alerts:writeAlerts and monitors
Continuous Integration (CI)Selectedorg:ciSource map uploads, releases, and code mappings

The Admin levels of Project, Team, Issue & Event, Organization, and Member only add the delete endpoints. Choose Read & Write for any of them if agents shouldn't delete in that area. Webhooks also need at least Read on Issue & Event for issue, error, comment, and Seer events, and on Project for mobile build events.

Sentry Auth Token

  1. In Sentry, open Settings → Developer Settings → Custom Integrations. Click Create New Integration, choose Internal Integration, and click Get started.
  2. Name it Helios. Leave Webhook URL empty for now.
  3. Under Permissions, set every permission as in the table above, and select Continuous Integration (CI).
  4. Click Save Changes. Copy the token under Tokens, and the Client Secret under Credentials. Sentry shows the client secret only briefly after you create the integration. You need it for triggers.
  5. In Helios, choose Sentry Auth Token. Paste the token into Auth Token, and enter your organization's slug, such as acme in acme.sentry.io, in Organization Slug.
  6. Save.

Internal integration tokens don't expire. If you revoke the token, create a new one under Tokens and enter it in Helios through Manage.

Your own Sentry OAuth app

This method connects through a public integration that you create. It can stay unpublished, because only your organization installs it.

  1. In Sentry, open Settings → Developer Settings → Custom Integrations. Click Create New Integration, choose Public Integration, and click Get started.

  2. Fill in Name and Author. Set Redirect URL to:

    https://api.heliosapp.com/integrations/sentry/oauth_callback
  3. Sentry requires a Webhook URL for public integrations. Use this until you connect:

    https://api.heliosapp.com/integrations/sentry/webhooks/pending
  4. Leave Verify Installation off. Under Permissions, set every permission as in the table above, and select Continuous Integration (CI). Click Save Changes.

  5. Copy the integration's slug from its URL in Developer Settings, and the Client ID and Client Secret under Credentials. Sentry shows the client secret only briefly after you create the integration.

  6. In Helios, choose Your own Sentry OAuth app. Enter the slug in Integration Slug, and fill in Client ID and Client Secret.

  7. Save. Sentry shows the integration's permissions and asks you to install it in your organization. If it's already installed, uninstall it in Sentry first.

Helios gets the organization from the installation, so this method has no organization field. Sentry's tokens expire after eight hours, and Helios refreshes them with the client secret. Helios also saves the client secret as the webhook secret, because Sentry signs webhooks with it.

If you rotate the client secret, enter the new one in Helios through Manage. After that, or after you change the integration's permissions, uninstall the integration in Sentry and connect again.

When you delete the connection in Helios, Helios also uninstalls the integration in Sentry. This needs Organization set to Read & Write or Admin. If the uninstall fails, Helios still deletes the connection, and you can uninstall the integration in Sentry yourself.

Sentry records changes made with either method as the integration, so the agent's changes show up under the integration's name in an issue's activity.

Triggers

Sentry can start a Workflow when something happens in your organization. Sentry sets an integration's webhook URL and events only in its own settings, so you set them up by hand. Events come from the integration you connected: the internal integration for Sentry Auth Token, or the public integration for Your own Sentry OAuth app.

Each integration sends webhooks to one URL. A Helios connection that needs triggers needs its own integration in Sentry.

With Sentry Auth Token

  1. In Helios, open the Sentry connection, click Manage, and open Advanced Configuration. Under Webhook Setup, paste the internal integration's Client Secret into the secret field and save. Then copy the webhook URL.
  2. In Sentry, open the internal integration under Settings → Developer Settings → Custom Integrations.
  3. Paste the URL into Webhook URL and turn on Alert Action.
  4. Under Webhooks, select every event. Select the Issues, Errors, Comments, Seer, and Preprod Artifacts boxes. Each box selects all of its events.
  5. Click Save Changes.

With your own Sentry OAuth app

Helios has already saved the client secret as the webhook secret.

  1. In Helios, open the Sentry connection, click Manage, and open Advanced Configuration. Copy the URL under Webhook Setup.
  2. In Sentry, open the public integration under Settings → Developer Settings → Custom Integrations.
  3. Replace the pending Webhook URL with the copied URL, and turn on Alert Action.
  4. Under Webhooks, select every event. Select the Issues, Errors, Comments, Seer, and Preprod Artifacts boxes. Each box selects all of its events.
  5. Click Save Changes.

Sentry sends installation events only to public integrations. installation.deleted arrives when the integration is uninstalled, and Helios then marks the connection Disconnected. installation.created arrives only when the integration is installed after its Webhook URL points at Helios, such as when you reinstall it.

If the Errors box can't be selected, your Sentry plan doesn't include error webhooks.

Alerts

Issue, error, comment, Seer, mobile build, and installation events arrive once the webhook is set up. Alert events arrive only from Sentry Alerts that send a notification through the integration you connected.

  1. In Sentry, go to Monitors → Alerts and click Create Alert.
  2. Choose the source. To be alerted by a Metric Monitor, choose Alert on specific monitors and connect it.
  3. Under When, choose the triggers. Triggers on issue activity, such as An issue is resolved or Seer runs on an issue and reaches the stage..., send activity_alert.triggered. The others send issue_alert.triggered.
  4. Under Then, add Send a notification via an integration and choose the integration you connected to Helios. If the integration has the schema for metric alerts, add its own action instead. With Your own Sentry OAuth app, choose the public integration, not an internal one.
  5. Click Create Alert.

To use an existing Alert, edit it and add the same action.

A Metric Monitor's Alert also arrives as these two events. issue_alert.triggered arrives when the monitor opens an issue, and activity_alert.triggered arrives when the issue resolves, if the Alert triggers on An issue is resolved. For metric_alert.triggered and metric_alert.resolved, set up the integration's own action as described below.

Metric alerts

Sentry sends metric_alert.triggered and metric_alert.resolved only through an integration's own Alert action. The integration gets that action when its schema has an alert rule action.

  1. In Helios, open the Sentry connection, click Manage, and copy the webhook URL under Webhook Setup. The last part of the URL is the connection's ID.

  2. In Sentry, open the integration under Settings → Developer Settings → Custom Integrations, and check that Alert Action is on.

  3. Paste this into Schema. Replace <connection ID> with the connection's ID.

    {
      "elements": [
        {
          "type": "alert-rule-action",
          "title": "Helios",
          "settings": {
            "type": "alert-rule-settings",
            "uri": "/integrations/sentry/webhooks/<connection ID>?alert-rule-action=1",
            "required_fields": [
              {
                "type": "select",
                "name": "target",
                "label": "Send to",
                "options": [["workflows", "Helios workflows"]]
              }
            ]
          }
        }
      ]
    }

    If an existing schema uses /integrations/sentry/alert-rule-action/<connection ID>, replace its uri with the webhook path and query string shown above before saving an Alert.

  4. Click Save Changes.

  5. In the Metric Monitor's Alert, under Then, add the action named after the integration, and choose Helios workflows in Send to. Save the Alert. Sentry asks Helios to confirm the action when you save it.

After you add the schema, Sentry lists the integration as its own action, and no longer under Send a notification via an integration. Alerts that already use that action keep working. The integration's own action also sends issue and activity alerts, as issue_alert.triggered and activity_alert.triggered.

Events

EventDescriptionFilters
issue.createdAn issue was createdproject, level
issue.resolvedAn issue was resolvedproject, level
issue.assignedAn issue was assigned to a member or teamproject, level
issue.archivedAn issue was archivedproject, level
issue.unresolvedA resolved or archived issue became unresolved againproject, level
error.createdSentry received an error event. Business plan and higherproject, level, environment (pattern)
comment.createdA comment was added to an issueproject
comment.updatedA comment on an issue was editedproject
comment.deletedA comment on an issue was deletedproject
issue_alert.triggeredAn issue alert sent a notification to the integrationproject, level, environment (pattern), alert rule (pattern)
metric_alert.triggeredA metric alert reached its warning or critical thresholdproject, environment (pattern), alert rule (pattern), severity
metric_alert.resolvedA metric alert was resolvedproject, environment (pattern), alert rule (pattern)
activity_alert.triggeredAn alert fired on an issue's status or Seer stageproject, level, alert rule (pattern), activity
seer.root_cause_startedSeer started looking for the root cause of an issuenone
seer.root_cause_completedSeer found the root cause of an issuenone
seer.solution_startedSeer started planning a fixnone
seer.solution_completedSeer finished planning a fixnone
seer.coding_startedSeer started writing the code for a fixnone
seer.coding_completedSeer finished writing the code for a fixnone
seer.pr_createdSeer opened pull requests for a fixnone
seer.iteration_startedSeer started updating its pull requestnone
seer.iteration_completedSeer finished updating its pull requestnone
preprod_artifact.size_analysis_completedSize analysis of a mobile build finished or failedproject
preprod_artifact.build_distribution_completedA mobile build's distribution processing endedproject
installation.createdThe public integration was installednone
installation.deletedThe public integration was uninstalled. Helios marks the connection Disconnectednone

All filters are optional. An empty filter matches every event.

  • Project matches the project's slug. The list shows the organization's projects, up to 5,000. A metric alert that covers several projects matches when any of them is selected.
  • Level is the issue's or event's level: fatal, error, warning, info, or debug.
  • Environment matches the event's or the metric alert's environment, such as production or staging-*.
  • Alert rule matches the Alert's name, such as Checkout *.
  • Severity is the threshold a metric alert reached: critical or warning.
  • Activity is the issue activity that fired an activity alert, such as Resolved, Regressed, Root cause analysis completed or Pull request created.

Environment and alert rule are patterns, and case matters. An event with no environment never matches an environment filter. Seer events name the issue only by its ID, so they have no filters.

When you save the connection, Helios checks which events can reach it. The trigger picker shows the others as unavailable, with the reason:

  • installation.created and installation.deleted on Sentry Auth Token connections, because Sentry sends them only to public integrations.
  • error.created when your Sentry plan doesn't include error webhooks.

Helios can't check whether the integration has the schema for metric alerts, so metric_alert.triggered and metric_alert.resolved are always available.

Deliveries are verified with the HMAC-SHA256 Sentry-Hook-Signature header, signed with the integration's client secret.

If a workflow subscribes to the corresponding event, resolving, archiving, or assigning an issue can start another issue.resolved, issue.archived, or issue.assigned run. Say in the prompt which events to ignore, such as changes the agent made. See Guarding against events you don't want.

Check that it works

  • The connection: after you save, the connection's status shows Connected. Error means Sentry rejected the token or the organization slug.
  • The webhook: in Sentry, open Settings → Developer Settings → Custom Integrations and click Dashboard next to the integration. The Request Log lists each delivery to Helios with its status code.
  • A trigger:
    1. Add issue.created to a workflow with no filters.
    2. Send a new error to a Sentry project so that a new issue is created.
    3. Check that a run starts. Then open the connection in Helios and click Webhook events to see the event.
  • An alert: repeat the steps with issue_alert.triggered and an Alert that fires on new issues.

Common errors

What you seeCauseFix
The connection's status shows Error, or an error that starts with Failed to call APISentry rejected the token, Organization Slug is wrong, or Base URL points at the wrong serverCheck the slug in your Sentry URL and the base URL. Create a new token if it was revoked
Sentry shows Requested permission of org:admin exceeds requester's permission when you save the integrationOnly Owners can set Organization: AdminAsk an Owner to set it, or choose Read & Write
Sentry shows a not found page when you connectIntegration Slug doesn't match the public integrationCopy the slug from the integration's URL in Developer Settings
Sentry returned … for a token request: …Client ID or Client Secret is wrong, or the client secret was rotatedEnter the current values through Manage, uninstall the integration in Sentry, and connect again
The Sentry connection is not installedThe OAuth install wasn't finishedConnect again and install the integration in Sentry
The connection's status shows DisconnectedThe public integration was uninstalled in SentryConnect again and install the integration in Sentry
No run starts after an eventThe Webhook URL in Sentry is empty or still pending, the event isn't selected under Webhooks, the filters don't match, or the plan doesn't include the event, such as error webhooks below the Business planFollow the trigger steps above, and try the trigger with no filters
An event shows as unavailable in the trigger pickerThe connection can't receive it. The picker shows the reasonUse Your own Sentry OAuth app for installation events, or a Business plan for error events. Then save the connection again
Issue events start runs, but alerts don'tAlert Action is off, the Alert sends to a different integration, such as an internal one when you connected your own OAuth app, or the Sentry plan doesn't include alerts through integrationsTurn on Alert Action, and choose the connected integration in the Alert's Send a notification via an integration action, or add the integration's own action. Sentry lists these alerts on the Team plan and higher
The Request Log shows 401The webhook secret in Helios isn't this integration's client secretEnter the integration's Client Secret under Webhook Setup. With your own OAuth app, connect again
The Request Log shows 400No webhook secret is saved in HeliosEnter the integration's Client Secret under Webhook Setup
The Request Log shows 404The Webhook URL is still pending, or belongs to a deleted connectionPaste the URL from the connection's Webhook Setup
Sentry can't save an Alert with the integration's own actionThe schema's uri has the wrong connection ID, or the webhook secret in Helios isn't the integration's client secretCopy the ID from the end of the webhook URL into the schema. Enter the integration's Client Secret under Webhook Setup
An agent gets 403 from an endpointThe integration lacks that endpoint's permission, such as Issue & Event: Admin for deleting issuesRaise the permission on the integration. With your own OAuth app, uninstall it in Sentry and connect again

Limits

Sentry rate limits each API endpoint separately, per caller. Responses carry X-Sentry-Rate-Limit-* headers that show the limit and what's left. See Sentry's rate limits.

Last updated on