Table: sentry_issue_alert - Query Sentry Issue Alerts using SQL
Sentry is an open-source application monitoring platform that helps uncover, triage, and prioritize errors in real-time. An Issue Alert in Sentry is a notification sent when certain conditions are met in a project, such as when an event occurs that matches the conditions defined in an alert rule. These alerts help to identify and manage issues in your applications and infrastructure.
Table Usage Guide
The sentry_issue_alert
table provides insights into Issue Alerts within Sentry's application monitoring platform. As a developer or DevOps engineer, explore alert-specific details through this table, including alert rules, projects, and associated metadata. Utilize it to uncover information about alerts, such as those related to specific projects or rules, helping you to triage and prioritize errors in your applications effectively.
Examples
Basic info
Explore which issues have triggered alerts in your Sentry application. This can help in identifying potential problematic areas, allowing for timely intervention and issue resolution.
select id, name, owner, organization_slug, project_slug, action_match, date_createdfrom sentry_issue_alert;
select id, name, owner, organization_slug, project_slug, action_match, date_createdfrom sentry_issue_alert;
List alerts for a particular project
Explore the alerts associated with a specific project to gain insights into issues that may need immediate attention. This can help in assessing the health and stability of the project.
select id, name, owner, organization_slug, project_slug, action_match, date_createdfrom sentry_issue_alertwhere project_slug = 'go';
select id, name, owner, organization_slug, project_slug, action_match, date_createdfrom sentry_issue_alertwhere project_slug = 'go';
List alerts owned by a particular team
Determine the areas in which specific alerts are owned by a certain team. This can help in understanding the distribution of responsibility and tracking the issues that a particular team needs to address.
select a.id, a.name, a.owner, a.organization_slug, a.project_slug, a.action_match, a.date_createdfrom sentry_issue_alert as a, sentry_team as twhere t.id = split_part(a.owner, ':', 2) and t.name = 'Team A';
Error: SQLite does not support split_part function.
Show list of actions of a particular alert
Explore the actions associated with a specific alert to gain insights into its configuration and owner details. This can be useful for understanding the alert's role and impact within a project.
select id, name, owner, project_slug, jsonb_pretty(actions) as actionsfrom sentry_issue_alertwhere name = 'alert1';
select id, name, owner, project_slug, actionsfrom sentry_issue_alertwhere name = 'alert1';
List alerts older than a month
Analyze the settings to understand any alerts that have been active for over a month. This can help in identifying long-standing issues that may require immediate attention or escalation.
select id, name, owner, organization_slug, project_slug, action_match, date_createdfrom sentry_issue_alertwhere date_created <= now() - interval '1 month';
select id, name, owner, organization_slug, project_slug, action_match, date_createdfrom sentry_issue_alertwhere date_created <= datetime('now', '-1 month');
Schema for sentry_issue_alert
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
action_match | text | Trigger actions when an event is captured by Sentry and any or all of the specified conditions happen. | |
actions | jsonb | List of actions. | |
conditions | jsonb | List of conditions. | |
created_by | jsonb | The rule creator who created the issue alert. | |
date_created | timestamp with time zone | The creation timestamp of the issue alert. | |
environment | text | Perform issue alert in a specific environment. | |
filter_match | text | Trigger actions if all, any, or none of the specified filters match. | |
filters | jsonb | List of filters. | |
frequency | bigint | Perform actions at most once every X minutes for this issue. Defaults to 30. | |
id | text | = | The ID of the issue alert. |
name | text | The issue alert name. | |
organization_slug | text | = | The slug of the organization the issue alert belongs to. |
owner | text | The owner of the issue alert. | |
project_slug | text | = | The slug of the project the issue alert belongs to. |
projects | jsonb | The projects for which the issue alert is created. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
task_uuid | text | The UUID of the async task that can be spawned to create the issue alert. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- sentry
You can pass the configuration to the command with the --config
argument:
steampipe_export_sentry --config '<your_config>' sentry_issue_alert