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

# Raygun alert integration

> Send error notifications and status changes from a Raygun Crash Reporting application to Flashduty On-call through a webhook.

Use the Webhook integration of a Raygun Crash Reporting application to send error notifications to Flashduty On-call. Each error group maps to one Flashduty alert: the alert triggers when the error first occurs or reoccurs, updates while it keeps occurring, and recovers when the error group is resolved or ignored in Raygun.

<div className="hide">
  ## In Flashduty On-call

  ***

  You can obtain an integration push URL in either of the following ways.

  ### Use a dedicated integration

  1. In the Flashduty console, select **Channel** and open a channel
  2. Select **Configuration** → **Integrations** → **Private integration**, then click **Add an integration**
  3. Select **Raygun**, then click **Save**
  4. Open the generated integration card and copy the **Push URL**

  ### Use a shared integration

  1. In the Flashduty console, select **Integration Center → Alert Events**
  2. Select **Raygun** and enter an integration name
  3. Configure the default route and select a channel; after creation, add more rules under **Route** if needed
  4. Click **Save** and copy the generated **Push URL**
</div>

## Configure Raygun

***

The Webhook integration is configured per application and is available only on Raygun's Team plan or higher. Configure each application separately; several applications can use the same push URL.

<Steps>
  <Step title="Add a Webhook integration">
    1. Open the application you want to connect in Raygun
    2. Click **Integrations** in the left-hand menu, then click **Webhooks** in the list of integrations
    3. On the **Setup** tab, paste the full Flashduty push URL into the **Url** field. The URL must include `integration_key`
    4. Select **Enabled** and click **Save Changes**
  </Step>

  <Step title="Review the events that are sent">
    Raygun sends these events for every error group of the application. Personal notification settings (**My notifications**) do not affect webhook delivery. Flashduty handles the events as follows:

    | Raygun event                                                                                         | `event` / `eventType`                                                                                                           | Effect in Flashduty                               |
    | :--------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------ |
    | A new error occurs                                                                                   | `error_notification` / `NewErrorOccurred`                                                                                       | Triggers the alert for the error group            |
    | A resolved error occurs again                                                                        | `error_notification` / `ErrorReoccurred`                                                                                        | Triggers or updates the alert for the error group |
    | The error keeps occurring (follow-ups at 1, 5, 10, and 30 minutes, then hourly)                      | `error_notification` / `OneMinuteFollowUp`, `FiveMinuteFollowUp`, `TenMinuteFollowUp`, `ThirtyMinuteFollowUp`, `HourlyFollowUp` | Updates the alert for the error group             |
    | The error group is marked resolved, including **Resolve in Version** and **Resolve in Next Version** | `error_activity` / `StatusChanged` with `status` `resolved` (case-insensitive)                                                  | Recovers the alert for the error group            |
    | The error group is ignored (**Ignore**)                                                              | `error_activity` / `StatusChanged` with `status` `archived` (case-insensitive)                                                  | Recovers the alert for the error group            |

    Changing an error group to Permanently Ignored or Active, as well as assignment (`AssignedToUser`) and comment (`CommentAdded`) events, creates no alert. Flashduty returns success for these events.
  </Step>

  <Step title="Verify">
    The Webhooks integration has no test button. Verify with a real error:

    1. Trigger a new error in an application that uses the Raygun SDK, and confirm that Flashduty receives an active alert. The first notification usually arrives within a minute
    2. On the error group page in Raygun, open the status menu and choose **Resolve**, and confirm that the alert recovers
  </Step>
</Steps>

<Note>
  Use the application-level **Integrations → Webhooks**. The plan-level webhooks in Raygun **Alerting** send a different payload (`EventType: Alert`) that carries no error group status changes, and Flashduty rejects them with a parameter error.
</Note>

## Alert Key

***

Flashduty groups alerts by Raygun error group: the new, reoccurred, follow-up, and resolved notifications of the same error group land on the same alert.

The Alert Key is built from `error.url` in the event, the link to the error group page in Raygun. Only the path of the link is used; the scheme, host, trailing slash, and query string are ignored. Changes to the error message, occurrence count, affected user count, and tags do not change the Alert Key. Events without `error.url` are rejected.

## Status and severity

***

Raygun errors carry no severity, so Flashduty uses Warning for all of them:

| Raygun event                                                              | Status  | Flashduty severity |
| :------------------------------------------------------------------------ | :------ | :----------------- |
| All `error_notification` events                                           | Trigger | Warning            |
| `StatusChanged` with `status` `resolved` or `archived` (case-insensitive) | Recover | -                  |

## Labels

***

| Label                                    | Source                                                       |
| :--------------------------------------- | :----------------------------------------------------------- |
| `event_type`                             | The `eventType` of the delivery                              |
| `status`                                 | The new status in a status change event                      |
| `application` / `application_url`        | Raygun application name and link                             |
| `url`                                    | Link to the error group page in Raygun                       |
| `error_group`                            | Error group path used to build the Alert Key                 |
| `users_affected` / `total_occurrences`   | Affected user count and total occurrences of the error group |
| `first_occurred_on` / `last_occurred_on` | Time the error group first and last occurred                 |
| `tags`                                   | Tags of the error instance, comma-separated                  |

Affected user identifiers, custom data (`customData`), and the name of the person who made a change are not written to labels.

## Troubleshooting

***

* **Webhooks is missing from the integration list**: Make sure the account is on the Team plan or higher, or on a trial
* **Flashduty returns a parameter error**: Make sure the URL is complete and includes `integration_key`, and that you configured the application-level webhook rather than a webhook in Alerting
* **The alert does not recover**: Make sure the error group was resolved (**Resolve**) or ignored (**Ignore**) in Raygun. Permanently Ignore and Active do not recover the alert
* **The error keeps occurring but no new deliveries arrive**: Raygun sends follow-up notifications only at 1, 5, 10, and 30 minutes and then hourly, not for every occurrence

For field details, see [Raygun Webhooks](https://raygun.com/documentation/product-guides/crash-reporting/integrations/webhooks/).
