Skip to main content

Sentry

CompanyEstimated TimeVendor DocsOpen Source
Functional Software Inc.5 minutesviewv3.rb

What is Sentry?

Sentry is a developer-first error tracking and performance monitoring platform that helps developers see what actually matters, solve quicker, and learn continuously about their applications.

How It Works

Sentry triggers user-defined alerts by monitoring website performance, errors, and issues.

  • When an issue or error is created in Sentry by Alert Conditions, an alert is created in PagerTree automatically.

Integration Walkthrough

In this integration tutorial, we will show you how to send issues from Sentry into PagerTree. The estimated time for this integration is 5 minutes. We assume that you already have a PagerTree and Sentry account setup.

Webhooks (Internal Integration)

PagerTree supports Sentry's Internal Integration webhooks.

tip

By using the webhooks integration, you can use custom Alerts and Conditions to control when issues are sent to PagerTree.

In PagerTree

  1. Create the integration by clicking the Sentry logo.
  2. Copy the Endpoint URL.

In Sentry

Create Internal Integration

  1. Settings -> Integrations -> Create New Integration.

  2. Select Internal Integration and click Next.

    Sentry Internal Integration

    Select Internal Integration and click Next.

  3. Configure the integration settings:

    • Name: Enter a name for the integration (e.g., "PagerTree Webhook").
    • Webhook URL: Paste the PagerTree Endpoint URL you copied.
    • Alert Rule Action: Enable. This option allows the integration to be used the in the Alert Conditions.
  4. Click Save Changes.

    Sentry Webhook Settings

    Configure the Sentry Webhook settings.

  5. Copy the Client Secret - Scroll to the bottom of the newly created Sentry integration and copy the client secret.

    Sentry Client Secret

    Copy the Client Secret.

Add Alert Conditions

  1. Navigate to Alerts, and click the "Create Alert" button.

    Sentry Create Alert

    Navigate to Alerts and click "Create Alert" button.

  2. Select Issues, and click "Set Conditions " button.

    Sentry Issues

    Select Issues and click "Set Conditions" button.

  3. On the New Alert Rule Page, select the following

    1. When any of the following happens
      1. A new issue is created
      2. The issue changes state from resolved to unresolved
    2. Then perform these actions
      1. Send a notification via PagerTree Webhook (or whatever you named the integration in the previous step).

        Sentry Webhooks

        Configure the new Alert rule to trigger on new issues and old issues going from resolved -> unresolved.

    3. Provide an Alert Name (ex: Report Issues to PagerTree)
  4. Click Save Rule

    Sentry Save Rule

    Click "Save Rule" button.

In PagerTree

  1. Edit the integration you created in the first step.
  2. Paste the Client Secret you copied from Sentry into the Client Secret field.
  3. Save the integration.
    Sentry Client Secret in PagerTree

    Paste the Client Secret into the PagerTree integration.

Testing

If you would like to test that an alert will be created in PagerTree when a new issue comes into Sentry you can use our docker image to generate a fake issue.

You will need:

  1. Docker running on your machine.
  2. Your SENTRY_DSN1.

To Test:

In your terminal run the following:

docker run -e SENTRY_DSN="<YOUR_SENTRY_DSN>" pagertree/sentry-error-faker:latest

This will generate an issue in Sentry similar to "CVE-2023-12345".

Native Integration

danger

The native Sentry integration will send ALL issues to PagerTree. If you want to control which issues are sent to PagerTree, use the Webhooks integration instead.

In PagerTree

  1. Ensure you are logged in to the PagerTree app in the account to which you wish to add the Sentry integration.

In Sentry

  1. Navigate to Settings -> Integrations.

  2. Search "PagerTree".

  3. Click on "PagerTree".

    Sentry Settings

    Settings -> Integrations -> PagerTree

  4. Click the "Accept & Install" button. (This will redirect you to the PagerTree New Integration page.)

    Pagertree install

    Click "Accept & Install"

  5. On the PagerTree New Integration page, provide at minimum, a name and destinations for the Sentry issues that will be sent to this integration. Click "Create".

    Sentry PagerTree Integration

    Provide name and destinations. Click Create.

  6. You will be redirected back to Sentry and can confirm that the integration was installed correctly.

    Confirm that the PagerTree Sentry app is installed correctly.

    Confirm that the PagerTree Sentry app is installed correctly.


You have successfully completed the Sentry Integration.


Footnotes

  1. This can be found on your Project Settings -> Client Keys page (https://<org_slug>.sentry.io/settings/projects/<project_name>/keys/) the DSN will have a domain of ingest.sentry.io