Send Sentry events to Tinybird

Sentry is a platform for monitoring and alerting on errors in your applications. By integrating Sentry with Tinybird, you can analyze your Sentry events in real time and enrich it with other data sources.

Some common use cases for sending Sentry events to Tinybird include:

  1. Analyze errors from your applications.
  2. Detect patterns in your error data.
  3. Build an alert system based on error patterns.
  4. Build custom analytical dashboards.

Read on to learn how to send logs from Sentry to Tinybird.

Before you start

Before you connect Sentry to Tinybird, ensure:

  • You have a Sentry account.
  • You have a Tinybird Workspace.

Connect Sentry to Tinybird

  1. In Sentry, go to Settings > Developer Settings > Custom Integrations.

  2. Select Create New Integration.

  3. In Tinybird, create a Data Source, called sentry, with the following schema:

SCHEMA >
    `action` LowCardinality(String) `json:$.action` DEFAULT 'unknown',
    `actor` JSON `json:$.actor` DEFAULT '{}',
    `data` JSON `json:$.data` DEFAULT '{}',
    `installation` JSON `json:$.installation` DEFAULT '{}'

ENGINE "MergeTree"
ENGINE_SORTING_KEY "action"

Using the JSON Data Type you can store the semi-structured data you receive from Sentry in a single column. You can later retrieve various events and their metadata as needed in your Pipes.

  1. In Tinybird, copy a token with privileges to append to the Data Source you created. You can use the admin token or create one with the required scope.

  2. Back in Sentry, paste the Events API URL in your Custom Integration. Use the query parameter name to match the name of the Data Source you created in Tinybird.

https://api.tinybird.co/v0/events?name=sentry&token=<your user token>

Replace the Tinybird API hostname or region with the API region that matches your Workspace.

  1. Select Alert Rule Action.

  2. In the Permissions box Issue and Event > Read.

  3. Check all webhooks and Save Changes.

  4. If you also want to send alerts to Tinybird, select Alerts from the left menu, click on an alert and select Edit Rule. You can select Send Notifications via your previously created Custom Integration.

  5. You can then select Send Test Notification to check the connection.

  6. You're done. Any of the Sentry events you selected are automatically sent to Tinybird through the Events API.

Check the status of the integration from the Log tab in the Tinybird sentry Data Source.

See also

Updated