Skip to content

Sentry

Sentry issues, events, Discover, releases, alerts, crons, replays and usage as SQL tables

Connector software
Free and open source
Service credentials
Required
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/sentry/index.md to help me query Sentry with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Find the production errors affecting users most

Uses your connected account. Set up the connector and credentials to run it with your data.

SELECT short_id, title, event_count, last_seen
FROM sentry.main.issues(environment := 'production')
WHERE status = 'unresolved' AND level IN ('error', 'fatal')
ORDER BY event_count DESC
LIMIT 10

Quick start

Choose where to run Sentry, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the release directly

Downloads the latest release for your platform and caches it locally.

ATTACH 'sentry' AS sentry (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-sentry'
);

3. Add service credentials

After attaching, create the secret for the service you want to query in the same SQL session. Replace the placeholders with your service settings.

sentry credentials

A Sentry auth token plus the host (sentry.io, a us / de region, or self-hosted) and default organization

Get these credentials β†’
secret.sql
CREATE SECRET sentry (
    TYPE sentry,
    auth_token   '<AUTH_TOKEN>',  -- secret
    base_url     '<base_url>',
    region       '<region>',
    organization '<organization>'
);
Credential fields and requirements β†’

4. Run a query

query.sql
SELECT short_id, title, event_count, last_seen
FROM sentry.main.issues(environment := 'production')
WHERE status = 'unresolved' AND level IN ('error', 'fatal')
ORDER BY event_count DESC
LIMIT 10
More example queries β†’
Technical details
Verified connector release
v0.2.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the release directly

Uses the verified release each time you attach the connector.

ATTACH 'sentry' AS sentry (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/[email protected]'
);

Overview

Sentry error and performance monitoring as read-only SQL, from sentry.io or a self-hosted Sentry, with WHERE filters pushed into Sentry's own search syntax.

Catalog

Everything sentry exposes once attached β€” read straight from the worker's released build.

sentry 1 schema
main 1 table Β· 22 functions

Sentry's REST API collections as SQL, scoped by organization, project, issue or release arguments.

Schema examples (12)
Examples (12)

Every organization

SELECT slug, name, region_url FROM sentry.main.organizations ORDER BY slug;

Organizations that require 2FA

SELECT slug, len(features) AS feature_count
FROM sentry.main.organizations
WHERE require_2fa
ORDER BY slug;

Projects per platform

SELECT platform, count(*) AS projects
FROM sentry.main.projects()
GROUP BY platform
ORDER BY projects DESC;

Projects in one organization that send session replays

SELECT slug, teams
FROM sentry.main.projects(organization := 'acme')
WHERE has_replays
ORDER BY slug;
8 more examples

Teams by size

SELECT slug, member_count, projects
FROM sentry.main.teams()
ORDER BY member_count DESC;

One row per team and owned project

SELECT t.slug, p
FROM sentry.main.teams() t,
     unnest(t.projects) AS u(p)
ORDER BY t.slug, p;

Members per role

SELECT role, count(*) AS members
FROM sentry.main.members()
GROUP BY role
ORDER BY members DESC;

Active members without two-factor authentication

SELECT name, role
FROM sentry.main.members()
WHERE NOT has_2fa AND NOT pending
ORDER BY name;

Visible environments

SELECT name FROM sentry.main.environments() ORDER BY name;

Environments per organization, hidden ones included

SELECT organization, count(*) AS environments
FROM sentry.main.environments(visibility := 'all')
GROUP BY organization
ORDER BY organization;

Top unresolved production errors (status and level are sent as issue search terms)

SELECT short_id, title, event_count, last_seen
FROM sentry.main.issues(environment := 'production')
WHERE status = 'unresolved' AND level IN ('error', 'fatal')
ORDER BY event_count DESC
LIMIT 10;

New issues per project since November (firstSeen:>= is pushed)

SELECT project_slug, count(*) AS new_issues
FROM sentry.main.issues(sort := 'new')
WHERE first_seen >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY project_slug
ORDER BY new_issues DESC;
Tables
organizations 2 examples10 cols

Sentry organizations the auth token can see

Columns
id VARCHAR
Organization id.
slugnot null VARCHAR
Organization slug (used in API paths and URLs).
name VARCHAR
Organization name.
status VARCHAR
Organization status (active, pending_deletion …).
created_at TIMESTAMP WITH TIME ZONE
When the organization was created.
require_2fa BOOLEAN
Members must use two-factor authentication.
is_early_adopter BOOLEAN
Early-adopter program member.
organization_url VARCHAR
The organization's web URL.
region_url VARCHAR
The API host for the organization's data-residency region.
features VARCHAR[]
Enabled organization feature flags.
ConstraintsPRIMARY KEY (slug)
Examples (2)

Every organization

SELECT slug, name, region_url FROM sentry.main.organizations ORDER BY slug;

Organizations that require 2FA

SELECT slug, len(features) AS feature_count
FROM sentry.main.organizations
WHERE require_2fa
ORDER BY slug;
Link
Table functions
audit_log (organization := VARCHAR) 2 examples

Sentry organization audit log (Business / Enterprise plans; feature-detected)

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
id VARCHAR
Entry id.
event VARCHAR
Event name, e.g. member.invite, project.remove.
actor VARCHAR
Who did it (user name or API key label).
actor_id VARCHAR
Actor user id.
ip_address VARCHAR
Source IP address.
note VARCHAR
Human-readable summary.
target_object VARCHAR
Id of the object changed.
target_user VARCHAR
User affected (name).
created_at TIMESTAMP WITH TIME ZONE
When it happened.
data JSON
Event details (JSON).
Examples (2)

Most common audit events

SELECT event, count(*) AS entries
FROM sentry.main.audit_log()
GROUP BY event
ORDER BY entries DESC;

Who invited whom (event=member.invite is sent to Sentry)

SELECT created_at, actor, note
FROM sentry.main.audit_log()
WHERE event = 'member.invite'
ORDER BY created_at DESC;
Link
discover (dataset VARCHAR, fields VARCHAR[], end_time := TIMESTAMP WITH TIME ZONE, environment := VARCHAR, organization := VARCHAR, project_id := VARCHAR, query := VARCHAR, sort := VARCHAR, start_time := TIMESTAMP WITH TIME ZONE, stats_period := VARCHAR) 2 examples

Query Sentry Discover / Explore (errors, transactions, spans): fields, aggregates, search, sort

Positional arguments
dataset VARCHAR
errors, transactions, spans or discover (errors + transactions).
fields VARCHAR[]
The Discover fields and aggregate functions to return, as a list; plain fields group the aggregates.
Named arguments
end_time := TIMESTAMP WITH TIME ZONE
Window end (named); defaults to now when only start_time is given. Β· default null
environment := VARCHAR
Environment name (named); NULL = every environment. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see. Β· default null
project_id := VARCHAR
Numeric project id (named); NULL = every project. Β· default null
query := VARCHAR
Sentry event search (named), e.g. 'level:error browser.name:Firefox'; ANDed with pushed filters. Β· default null
sort := VARCHAR
Sort field (named): a requested field, with a leading '-' for descending order. Β· default null
start_time := TIMESTAMP WITH TIME ZONE
Window start (named); with end_time replaces stats_period. Β· default null
stats_period := VARCHAR
Relative window (named), e.g. '24h', '14d' (default 14d). Ignored with start_time / end_time. Β· default null
Returns columns
organization VARCHAR
Slug of the organization queried.
transaction VARCHAR
Discover field transaction.
count BIGINT
Discover field count().
p95_transaction_duration DOUBLE
Discover field p95(transaction.duration).
Returns columns Β· depends on the arguments
organization VARCHAR
Slug of the organization queried.
transaction VARCHAR
Discover field transaction.
count BIGINT
Discover field count().
p95_transaction_duration DOUBLE
Discover field p95(transaction.duration).
Examples (2)

Busiest transactions with their p95 latency

SELECT transaction, count, p95_transaction_duration
FROM sentry.main.discover('transactions', ['transaction', 'count()', 'p95(transaction.duration)'], sort := '-count()')
ORDER BY count DESC
LIMIT 10;

Exception types with at least ten errors in the last day (count():>=10 is pushed)

SELECT error_type, count
FROM sentry.main.discover('errors', ['error.type', 'count()'], query := 'level:error', stats_period := '24h')
WHERE count >= 10
ORDER BY count DESC;
Link
environments (organization := VARCHAR, visibility := VARCHAR) 2 examples

Sentry environments of an organization (production, staging …)

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
visibility := VARCHAR
Which environments to list (named): visible (default), hidden or all. Β· default "visible"
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
id VARCHAR
Environment id.
name VARCHAR
Environment name.
Examples (2)

Visible environments

SELECT name FROM sentry.main.environments() ORDER BY name;

Environments per organization, hidden ones included

SELECT organization, count(*) AS environments
FROM sentry.main.environments(visibility := 'all')
GROUP BY organization
ORDER BY organization;
Link
issue_alert_rules (organization := VARCHAR, project_slug := VARCHAR) 2 examples

Sentry issue alert rules per project: conditions, filters, actions, frequency

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
project_slug := VARCHAR
Project slug (named). NULL reads every project of the organization (one call per project); a pushed WHERE project_slug = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
project_slug VARCHAR
Project slug.
id VARCHAR
Rule id.
name VARCHAR
Rule name.
environment VARCHAR
Environment the rule is limited to (NULL: all).
action_match VARCHAR
Conditions combinator: all, any or none.
filter_match VARCHAR
Filters combinator: all, any or none.
frequency_minutes INTEGER
Minimum minutes between notifications for the same issue.
status VARCHAR
active or disabled.
owner VARCHAR
Owner (user:<id> or team:<id>).
created_by VARCHAR
Name of the creator.
created_at TIMESTAMP WITH TIME ZONE
When the rule was created.
snoozed BOOLEAN
The rule is muted.
action_count INTEGER
Number of actions.
conditions JSON
Trigger conditions (JSON array).
filters JSON
Filters (JSON array).
actions JSON
Actions (JSON array: notify email, Slack, PagerDuty …).
Examples (2)

Issue alert rules of every project

SELECT project_slug, name, frequency_minutes, action_count
FROM sentry.main.issue_alert_rules()
ORDER BY project_slug, name;

Active, unmuted issue alert rules per project

SELECT project_slug, count(*) AS rules
FROM sentry.main.issue_alert_rules()
WHERE status = 'active' AND NOT snoozed
GROUP BY project_slug
ORDER BY rules;
Link
issue_events (end_time := TIMESTAMP WITH TIME ZONE, environment := VARCHAR, issue_id := VARCHAR, organization := VARCHAR, query := VARCHAR, start_time := TIMESTAMP WITH TIME ZONE, stats_period := VARCHAR, which := VARCHAR) 2 examples

Events of a Sentry issue (all, or just the latest / oldest / recommended one), exception summarized

Named arguments
end_time := TIMESTAMP WITH TIME ZONE
Window end (named); defaults to now when only start_time is given. Β· default null
environment := VARCHAR
Environment name (named); also pushed from WHERE environment =. Β· default null
issue_id := VARCHAR
Issue id (named). Required unless WHERE issue_id = / IN (...) is given. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
query := VARCHAR
Event search (named), e.g. 'release:1.2.0 browser.name:Firefox'; ANDed with pushed filters. Β· default null
start_time := TIMESTAMP WITH TIME ZONE
Window start (named); with end_time replaces stats_period. Β· default null
stats_period := VARCHAR
Relative time window (named), e.g. '24h', '14d', '90d' (Sentry statsPeriod). Ignored when start_time / end_time is given. Β· default null
which := VARCHAR
all (default), latest, oldest or recommended (named). Β· default "all"
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
issue_id VARCHAR
The issue the event belongs to.
event_id VARCHAR
Event id (32 hex characters).
title VARCHAR
Event title.
message VARCHAR
Log message or formatted exception.
event_type VARCHAR
error, default, transaction …
platform VARCHAR
SDK platform.
created_at TIMESTAMP WITH TIME ZONE
When the event happened (client timestamp).
received_at TIMESTAMP WITH TIME ZONE
When Sentry received the event.
culprit VARCHAR
Transaction or function blamed.
location VARCHAR
Source location of the error.
environment VARCHAR
environment tag.
release VARCHAR
Release version (release tag).
level VARCHAR
level tag.
user_id VARCHAR
Affected user's id as sent by the SDK (no email or IP).
exception_type VARCHAR
Innermost exception type.
exception_value VARCHAR
Innermost exception message.
handled BOOLEAN
The exception was handled (mechanism.handled).
top_in_app_frame VARCHAR
Innermost in-app stack frame as 'function (file:line)'.
sdk VARCHAR
SDK name and version.
tags STRUCT(key VARCHAR, value VARCHAR)[]
Every tag of the event.
Examples (2)

The latest event of an issue with its innermost in-app frame

SELECT event_id, created_at, release, exception_type, top_in_app_frame
FROM sentry.main.issue_events(issue_id := '4504001', which := 'latest');

Events of an issue per release in production

SELECT release, count(*) AS events
FROM sentry.main.issue_events(issue_id := '4504001')
WHERE environment = 'production'
GROUP BY release
ORDER BY events DESC;
Link
issue_tag_values (environment := VARCHAR, issue_id := VARCHAR, key := VARCHAR, organization := VARCHAR, sort := VARCHAR) 2 examples

Every value of one tag of a Sentry issue, with counts

Named arguments
environment := VARCHAR
Environment name (named); NULL = all environments. Β· default null
issue_id := VARCHAR
Issue id (named). Required unless WHERE issue_id = / IN (...) is given. Β· default null
key := VARCHAR
Tag key (named), e.g. 'browser' or 'release'. Required unless WHERE key = is given. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
sort := VARCHAR
Order (named): -count (default), -last_seen, -first_seen, -id. Β· default "-count"
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
issue_id VARCHAR
The issue.
key VARCHAR
Tag key.
value VARCHAR
Tag value.
name VARCHAR
Display name of the value.
count BIGINT
Events with this value.
first_seen TIMESTAMP WITH TIME ZONE
First event with this value.
last_seen TIMESTAMP WITH TIME ZONE
Latest event with this value.
Examples (2)

Which releases an issue appears in

SELECT value, count
FROM sentry.main.issue_tag_values(issue_id := '4504001', key := 'release')
ORDER BY count DESC;

Events of an issue from any Chrome version

SELECT sum(count) AS events
FROM sentry.main.issue_tag_values(issue_id := '4504001', key := 'browser')
WHERE value LIKE 'Chrome%';
Link
issue_tags (environment := VARCHAR, issue_id := VARCHAR, organization := VARCHAR) 2 examples

Tag keys of a Sentry issue with their top values and counts

Named arguments
environment := VARCHAR
Environment name (named); NULL = all environments. Β· default null
issue_id := VARCHAR
Issue id (named). Required unless WHERE issue_id = / IN (...) is given. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
issue_id VARCHAR
The issue.
key VARCHAR
Tag key.
name VARCHAR
Tag display name.
total_values BIGINT
Number of events carrying the tag.
top_values STRUCT of 4 fields[]
Most common values of the tag.
STRUCT[] 4 fields
  • valueVARCHAR
  • countBIGINT
  • first_seenTIMESTAMP WITH TIME ZONE
  • last_seenTIMESTAMP WITH TIME ZONE
Examples (2)

Tag keys of an issue

SELECT key, total_values
FROM sentry.main.issue_tags(issue_id := '4504001')
ORDER BY total_values DESC;

Which browsers an issue affects

SELECT v.value, v.count
FROM sentry.main.issue_tags(issue_id := '4504001') t,
     unnest(t.top_values) AS u(v)
WHERE t.key = 'browser'
ORDER BY v.count DESC;
Link
issues (end_time := TIMESTAMP WITH TIME ZONE, environment := VARCHAR, organization := VARCHAR, page_size := INTEGER, project := VARCHAR, query := VARCHAR, sort := VARCHAR, start_time := TIMESTAMP WITH TIME ZONE, stats_period := VARCHAR, tags := VARCHAR[]) 2 examples

Sentry issues (grouped errors and other problems) with pushed-down issue search

Named arguments
end_time := TIMESTAMP WITH TIME ZONE
Window end (named); defaults to now when only start_time is given. Β· default null
environment := VARCHAR
Environment name (named), e.g. 'production'; NULL = every environment. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
page_size := INTEGER
Issues per Sentry page (named), 1-100 (default 100). Β· default 100
project := VARCHAR
Project slug (named); NULL = every project. Also pushed from WHERE project_slug = / IN. Β· default null
query := VARCHAR
Raw Sentry issue search (named), e.g. 'assigned:me is:unresolved' or 'url:*checkout*'; ANDed with the pushed filters. Β· default null
sort := VARCHAR
Order (named): date (last seen, default), new (first seen), freq (events), user (users), trends, inbox. Β· default "date"
start_time := TIMESTAMP WITH TIME ZONE
Window start (named); with end_time replaces stats_period. Β· default null
stats_period := VARCHAR
Relative time window (named), e.g. '24h', '14d', '90d' (Sentry statsPeriod). Ignored when start_time / end_time is given. Β· default null
tags := VARCHAR[]
Tag filters (named), each a key:value string; values are quoted for Sentry automatically. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
issue_id VARCHAR
Issue (group) id.
short_id VARCHAR
Human issue id, e.g. BACKEND-1A.
title VARCHAR
Issue title.
culprit VARCHAR
Where the error happened (transaction or function).
status VARCHAR
Sentry status: unresolved, resolved or ignored.
substatus VARCHAR
ongoing, new, regressed, escalating, archived_until_escalating, archived_forever …
incident_status VARCHAR
Cross-worker incident status: triggered (unresolved), acknowledged (ignored/archived) or resolved.
level VARCHAR
Level: fatal, error, warning, info, debug.
priority VARCHAR
Issue priority: high, medium or low.
issue_type VARCHAR
Issue type (error, performance_n_plus_one_db_queries, …).
issue_category VARCHAR
Issue category: error, performance, cron, replay, feedback, …
project_slug VARCHAR
Slug of the project the issue belongs to.
project_id VARCHAR
Id of the project.
platform VARCHAR
Platform of the events (python, javascript …).
logger VARCHAR
Logger name, if any.
exception_type VARCHAR
Exception type from the issue metadata (e.g. KeyError).
exception_value VARCHAR
Exception message from the issue metadata.
first_seen TIMESTAMP WITH TIME ZONE
First event of the issue.
created_at TIMESTAMP WITH TIME ZONE
Same as first_seen (incident vocabulary).
last_seen TIMESTAMP WITH TIME ZONE
Most recent event of the issue.
event_count BIGINT
Number of events (in the stats window).
user_count BIGINT
Number of distinct affected users (in the stats window).
assignee VARCHAR
Assigned user's name or team slug (NULL: unassigned).
assignee_type VARCHAR
user or team.
assignee_id VARCHAR
Id of the assigned user or team.
is_unhandled BOOLEAN
At least one event was unhandled (crashed).
is_bookmarked BOOLEAN
Bookmarked by the token's user.
is_public BOOLEAN
Shared publicly.
has_seen BOOLEAN
The token's user has viewed the issue.
comment_count INTEGER
Number of comments.
url VARCHAR
Link to the issue in the Sentry web UI.
Examples (2)

Top unresolved production errors (status and level are sent as issue search terms)

SELECT short_id, title, event_count, last_seen
FROM sentry.main.issues(environment := 'production')
WHERE status = 'unresolved' AND level IN ('error', 'fatal')
ORDER BY event_count DESC
LIMIT 10;

New issues per project since November (firstSeen:>= is pushed)

SELECT project_slug, count(*) AS new_issues
FROM sentry.main.issues(sort := 'new')
WHERE first_seen >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY project_slug
ORDER BY new_issues DESC;
Link
members (organization := VARCHAR) 2 examples

Sentry organization members: role, invite state, 2FA, team roles

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
id VARCHAR
Organization member id.
user_id VARCHAR
Sentry user id (NULL for a pending invite).
name VARCHAR
Display name.
email VARCHAR
Email address, as returned to the token's scope.
role VARCHAR
Organization role: member, admin, manager, owner, billing.
pending BOOLEAN
The invitation has not been accepted yet.
expired BOOLEAN
The invitation has expired.
invite_status VARCHAR
approved, requested_to_be_invited or requested_to_join.
has_2fa BOOLEAN
The user has two-factor authentication enabled.
is_active BOOLEAN
The user account is active.
created_at TIMESTAMP WITH TIME ZONE
When the member was added or invited.
team_roles STRUCT(team VARCHAR, role VARCHAR)[]
Teams the member belongs to and their role in each.
Examples (2)

Members per role

SELECT role, count(*) AS members
FROM sentry.main.members()
GROUP BY role
ORDER BY members DESC;

Active members without two-factor authentication

SELECT name, role
FROM sentry.main.members()
WHERE NOT has_2fa AND NOT pending
ORDER BY name;
Link
metric_alert_incidents (organization := VARCHAR) 2 examples

Sentry metric alert incidents (triggered metric alerts) in the shared incident vocabulary

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
incident_id VARCHAR
Incident identifier (unique within the organization).
id VARCHAR
Internal incident id.
title VARCHAR
Incident title (the alert rule name).
status VARCHAR
Normalized: triggered or resolved.
raw_status VARCHAR
Sentry status: open, warning, critical or closed.
severity VARCHAR
Highest severity reached: warning or critical.
created_at TIMESTAMP WITH TIME ZONE
When the incident started.
detected_at TIMESTAMP WITH TIME ZONE
When Sentry detected it.
resolved_at TIMESTAMP WITH TIME ZONE
When it closed (NULL while open).
time_to_resolve_seconds DOUBLE
resolved_at - created_at, seconds.
alert_rule_id VARCHAR
Id of the metric alert rule.
alert_rule_name VARCHAR
Name of the metric alert rule.
projects VARCHAR[]
Project slugs.
url VARCHAR
Link to the incident in the Sentry web UI.
Examples (2)

Noisiest metric alerts and their mean time to resolve

SELECT alert_rule_name, count(*) AS incidents,
  avg(time_to_resolve_seconds) / 60 AS avg_minutes_to_resolve
FROM sentry.main.metric_alert_incidents()
WHERE status = 'resolved'
GROUP BY alert_rule_name
ORDER BY incidents DESC;

Open metric alert incidents (status=open is sent to Sentry)

SELECT incident_id, title, severity, created_at
FROM sentry.main.metric_alert_incidents()
WHERE status = 'triggered'
ORDER BY created_at;
Link
metric_alert_rules (organization := VARCHAR) 2 examples

Sentry metric alert rules: aggregate, query, window, critical / warning thresholds

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
id VARCHAR
Rule id.
name VARCHAR
Rule name.
dataset VARCHAR
Dataset the aggregate runs on.
query VARCHAR
Event search the aggregate is limited to.
aggregate VARCHAR
Aggregate expression, e.g. count() or p95(transaction.duration).
time_window_minutes INTEGER
Aggregation window, minutes.
threshold_type VARCHAR
above or below.
critical_threshold DOUBLE
Threshold of the critical trigger.
warning_threshold DOUBLE
Threshold of the warning trigger (NULL: none).
resolve_threshold DOUBLE
Value at which the alert resolves (NULL: the trigger threshold).
environment VARCHAR
Environment (NULL: all).
projects VARCHAR[]
Project slugs.
owner VARCHAR
Owner (user:<id> or team:<id>).
created_at TIMESTAMP WITH TIME ZONE
When the rule was created.
modified_at TIMESTAMP WITH TIME ZONE
When the rule was last changed.
triggers JSON
Triggers with their actions (JSON array).
Examples (2)

Metric alert rules and their thresholds

SELECT name, aggregate, critical_threshold, time_window_minutes
FROM sentry.main.metric_alert_rules()
ORDER BY name;

Metric alert rules per dataset

SELECT dataset, count(*) AS rules
FROM sentry.main.metric_alert_rules()
GROUP BY dataset
ORDER BY rules DESC;
Link
monitor_checkins (end_time := TIMESTAMP WITH TIME ZONE, environment := VARCHAR, monitor_slug := VARCHAR, organization := VARCHAR, start_time := TIMESTAMP WITH TIME ZONE, stats_period := VARCHAR) 2 examples

Check-ins of Sentry cron monitors: status, duration, expected time

Named arguments
end_time := TIMESTAMP WITH TIME ZONE
Window end (named); defaults to now when only start_time is given. Β· default null
environment := VARCHAR
Environment name (named); also from WHERE environment =. Β· default null
monitor_slug := VARCHAR
Monitor slug (named). NULL reads every monitor; WHERE monitor_slug = / IN works the same way. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
start_time := TIMESTAMP WITH TIME ZONE
Window start (named); with end_time replaces stats_period. Β· default null
stats_period := VARCHAR
Relative time window (named), e.g. '24h', '14d', '90d' (Sentry statsPeriod). Ignored when start_time / end_time is given. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
monitor_slug VARCHAR
Monitor slug.
checkin_id VARCHAR
Check-in id.
environment VARCHAR
Environment.
status VARCHAR
ok, error, in_progress, missed or timeout.
duration_ms BIGINT
Run time in milliseconds (NULL: still running / missed).
created_at TIMESTAMP WITH TIME ZONE
When the check-in was received.
expected_at TIMESTAMP WITH TIME ZONE
When the schedule expected this check-in.
Examples (2)

Check-in outcomes per monitor

SELECT monitor_slug, status, count(*) AS checkins
FROM sentry.main.monitor_checkins()
GROUP BY ALL
ORDER BY monitor_slug, status;

Run times of the last 20 successful runs of one job

SELECT created_at, duration_ms
FROM sentry.main.monitor_checkins(monitor_slug := 'nightly-billing')
WHERE status = 'ok'
ORDER BY created_at DESC
LIMIT 20;
Link
monitors (environment := VARCHAR, organization := VARCHAR) 2 examples

Sentry cron monitors with schedule, margins and per-environment status

Named arguments
environment := VARCHAR
Environment name (named); only monitors with check-ins there. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
id VARCHAR
Monitor id.
slug VARCHAR
Monitor slug (used in check-in URLs).
name VARCHAR
Monitor name.
project_slug VARCHAR
Project slug.
project_id VARCHAR
Project id.
status VARCHAR
active or disabled.
is_muted BOOLEAN
Notifications are muted.
schedule_type VARCHAR
crontab or interval.
schedule VARCHAR
Crontab expression or 'every <n> <unit>'.
timezone VARCHAR
Schedule timezone.
checkin_margin_minutes INTEGER
Grace period before a check-in counts as missed.
max_runtime_minutes INTEGER
Runtime after which an in-progress check-in times out.
failure_issue_threshold INTEGER
Consecutive failures before an issue opens.
created_at TIMESTAMP WITH TIME ZONE
When the monitor was created.
environment_status VARCHAR
Worst status across environments: error, timeout, missed_checkin, ok, active.
last_check_in TIMESTAMP WITH TIME ZONE
Latest check-in across environments.
next_check_in TIMESTAMP WITH TIME ZONE
Next expected check-in across environments.
environments STRUCT of 5 fields[]
Per-environment state.
STRUCT[] 5 fields
  • nameVARCHAR
  • statusVARCHAR
  • is_mutedBOOLEAN
  • last_check_inTIMESTAMP WITH TIME ZONE
  • next_check_inTIMESTAMP WITH TIME ZONE
Examples (2)

Cron monitors that are failing, timing out or missing check-ins

SELECT slug, schedule, environment_status, last_check_in
FROM sentry.main.monitors()
WHERE environment_status <> 'ok'
ORDER BY slug;

Active cron monitors per project

SELECT project_slug, count(*) AS monitors
FROM sentry.main.monitors()
WHERE status = 'active'
GROUP BY project_slug
ORDER BY project_slug;
Link
projects (organization := VARCHAR) 2 examples

Sentry projects of an organization, with platform, teams and product flags

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
id VARCHAR
Project id.
slug VARCHAR
Project slug.
name VARCHAR
Project name.
platform VARCHAR
Project platform (python, javascript-react …).
created_at TIMESTAMP WITH TIME ZONE
When the project was created.
first_event TIMESTAMP WITH TIME ZONE
When the project received its first error event (NULL: none yet).
first_transaction_event BOOLEAN
The project has received a transaction.
has_sessions BOOLEAN
Release health sessions are being sent.
has_replays BOOLEAN
Session replays are being sent.
has_monitors BOOLEAN
The project has cron monitors.
has_profiles BOOLEAN
Profiles are being sent.
is_bookmarked BOOLEAN
Bookmarked by the token's user.
is_member BOOLEAN
The token's user is a member of a team owning the project.
teams VARCHAR[]
Slugs of the teams that own the project.
Examples (2)

Projects per platform

SELECT platform, count(*) AS projects
FROM sentry.main.projects()
GROUP BY platform
ORDER BY projects DESC;

Projects in one organization that send session replays

SELECT slug, teams
FROM sentry.main.projects(organization := 'acme')
WHERE has_replays
ORDER BY slug;
Link
release_commits (organization := VARCHAR, version := VARCHAR) 2 examples

Commits associated with Sentry releases

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
version := VARCHAR
Release version (named). NULL reads every open release (one call per release); a pushed WHERE version = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
version VARCHAR
Release version.
commit_sha VARCHAR
Commit SHA.
message VARCHAR
Commit message.
created_at TIMESTAMP WITH TIME ZONE
Commit time.
author VARCHAR
Author name.
repository VARCHAR
Repository name (owner/repo).
Examples (2)

Who contributed to a release

SELECT author, count(*) AS commits
FROM sentry.main.release_commits(version := '[email protected]')
GROUP BY author
ORDER BY commits DESC;

Commits per release and repository

SELECT version, repository, count(*) AS commits
FROM sentry.main.release_commits()
GROUP BY ALL
ORDER BY version, repository;
Link
release_deploys (organization := VARCHAR, version := VARCHAR) 2 examples

Deploys of Sentry releases: environment, start / finish time, name and URL

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
version := VARCHAR
Release version (named). NULL reads every open release (one call per release); a pushed WHERE version = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
version VARCHAR
Release version.
deploy_id VARCHAR
Deploy id.
environment VARCHAR
Environment deployed to.
name VARCHAR
Deploy name.
started_at TIMESTAMP WITH TIME ZONE
When the deploy started.
finished_at TIMESTAMP WITH TIME ZONE
When the deploy finished.
created_at TIMESTAMP WITH TIME ZONE
finished_at, else started_at (web-deploy vocabulary).
url VARCHAR
URL of the deploy (CI run, dashboard …).
Examples (2)

The latest production deploys

SELECT version, environment, finished_at
FROM sentry.main.release_deploys()
WHERE environment = 'production'
ORDER BY finished_at DESC
LIMIT 10;

Where one release was deployed

SELECT environment, count(*) AS deploys
FROM sentry.main.release_deploys(version := '[email protected]')
GROUP BY environment
ORDER BY environment;
Link
release_health (environment := VARCHAR, organization := VARCHAR, project_id := VARCHAR, query := VARCHAR, sort := VARCHAR, status := VARCHAR) 2 examples

Sentry release health per release and project: crash-free rates, adoption, sessions

Named arguments
environment := VARCHAR
Environment name (named); only releases deployed / seen there. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
project_id := VARCHAR
Numeric project id (named); NULL = every project. Also pushed from WHERE project_id =. Β· default null
query := VARCHAR
Version search (named): releases whose version contains this text. Β· default null
sort := VARCHAR
Order (named): date (default), sessions, users, crash_free_sessions, crash_free_users, adoption, semver. Β· default "date"
status := VARCHAR
open (default when NULL: Sentry lists open releases) or archived (named). Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
version VARCHAR
Release version.
project_slug VARCHAR
Project slug.
project_id VARCHAR
Project id.
has_health_data BOOLEAN
Sessions have been received for this release and project.
crash_free_sessions DOUBLE
Crash-free sessions, percent.
crash_free_users DOUBLE
Crash-free users, percent.
adoption DOUBLE
Percent of users on this release (last 24h).
sessions_adoption DOUBLE
Percent of sessions on this release (last 24h).
total_sessions BIGINT
Sessions in the summary period.
total_users BIGINT
Users in the summary period.
sessions_crashed BIGINT
Crashed sessions in the summary period.
adoption_stage VARCHAR
adopted, low_adoption or replaced (per environment, when reported).
created_at TIMESTAMP WITH TIME ZONE
When the release was created.
Examples (2)

Least stable releases first

SELECT version, project_slug, crash_free_sessions, adoption
FROM sentry.main.release_health()
WHERE has_health_data
ORDER BY crash_free_sessions;

Average crash-free users per project in production

SELECT project_slug, avg(crash_free_users) AS avg_crash_free_users
FROM sentry.main.release_health(environment := 'production')
GROUP BY project_slug
ORDER BY project_slug;
Link
releases (environment := VARCHAR, organization := VARCHAR, project_id := VARCHAR, query := VARCHAR, sort := VARCHAR, status := VARCHAR) 2 examples

Sentry releases: versions, dates, new issues, commits, deploys and projects

Named arguments
environment := VARCHAR
Environment name (named); only releases deployed / seen there. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
project_id := VARCHAR
Numeric project id (named); NULL = every project. Also pushed from WHERE project_id =. Β· default null
query := VARCHAR
Version search (named): releases whose version contains this text. Β· default null
sort := VARCHAR
Order (named): date (default), sessions, users, crash_free_sessions, crash_free_users, adoption, semver. Β· default "date"
status := VARCHAR
open (default when NULL: Sentry lists open releases) or archived (named). Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
version VARCHAR
Release version.
short_version VARCHAR
Shortened version for display.
ref VARCHAR
VCS ref (commit SHA or tag) the release was built from.
url VARCHAR
URL associated with the release.
status VARCHAR
open or archived.
created_at TIMESTAMP WITH TIME ZONE
When the release was created in Sentry.
released_at TIMESTAMP WITH TIME ZONE
When the release was marked released (finalized).
first_event TIMESTAMP WITH TIME ZONE
First event seen in the release.
last_event TIMESTAMP WITH TIME ZONE
Latest event seen in the release.
new_issues BIGINT
Issues first seen in this release.
commit_count BIGINT
Commits associated with the release.
deploy_count BIGINT
Deploys of the release.
last_deploy_environment VARCHAR
Environment of the most recent deploy.
last_deploy_at TIMESTAMP WITH TIME ZONE
When the most recent deploy finished.
authors VARCHAR[]
Commit author names.
projects VARCHAR[]
Slugs of the release's projects.
Examples (2)

The ten most recent releases and the new issues they introduced

SELECT version, released_at, new_issues, deploy_count
FROM sentry.main.releases()
ORDER BY created_at DESC
LIMIT 10;

Releases per project

SELECT p AS project, count(*) AS releases
FROM sentry.main.releases(),
     unnest(projects) AS u(p)
GROUP BY p
ORDER BY releases DESC;
Link
replays (end_time := TIMESTAMP WITH TIME ZONE, environment := VARCHAR, organization := VARCHAR, project_id := VARCHAR, query := VARCHAR, sort := VARCHAR, start_time := TIMESTAMP WITH TIME ZONE, stats_period := VARCHAR) 2 examples

Sentry session replay metadata (no recordings): duration, errors, rage clicks, browser

Named arguments
end_time := TIMESTAMP WITH TIME ZONE
Window end (named); defaults to now when only start_time is given. Β· default null
environment := VARCHAR
Environment name (named); also pushed from WHERE environment =. Β· default null
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
project_id := VARCHAR
Numeric project id (named); also pushed from WHERE project_id =. Β· default null
query := VARCHAR
Replay search (named), e.g. 'count_errors:>0 url:*checkout*'; ANDed with pushed filters. Β· default null
sort := VARCHAR
Order (named): -started_at (default), started_at, -duration, -count_errors, -count_rage_clicks … Β· default "-started_at"
start_time := TIMESTAMP WITH TIME ZONE
Window start (named); with end_time replaces stats_period. Β· default null
stats_period := VARCHAR
Relative time window (named), e.g. '24h', '14d', '90d' (Sentry statsPeriod). Ignored when start_time / end_time is given. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
replay_id VARCHAR
Replay id.
project_id VARCHAR
Project id.
started_at TIMESTAMP WITH TIME ZONE
Replay start.
finished_at TIMESTAMP WITH TIME ZONE
Replay end.
duration_seconds BIGINT
Duration, seconds.
error_count BIGINT
Errors during the replay.
segment_count BIGINT
Recording segments.
url_count BIGINT
Pages visited.
dead_click_count BIGINT
Clicks with no visible response.
rage_click_count BIGINT
Rapid repeated clicks (frustration).
environment VARCHAR
Environment.
platform VARCHAR
SDK platform.
releases VARCHAR[]
Release versions seen in the replay.
browser_name VARCHAR
Browser name.
browser_version VARCHAR
Browser version.
os_name VARCHAR
Operating system name.
os_version VARCHAR
Operating system version.
device_name VARCHAR
Device name / model.
replay_type VARCHAR
session or buffer (on-error capture).
is_archived BOOLEAN
Replay is archived (no longer viewable).
user_id VARCHAR
User id as sent by the SDK (no email, name or IP).
urls VARCHAR[]
URLs visited, in order.
Examples (2)

Rage clicks per browser

SELECT browser_name, count(*) AS replays,
  sum(rage_click_count) AS rage_clicks
FROM sentry.main.replays()
GROUP BY browser_name
ORDER BY rage_clicks DESC;

Production replays with errors (count_errors:>=1 is pushed)

SELECT replay_id, duration_seconds, error_count
FROM sentry.main.replays(environment := 'production')
WHERE error_count >= 1
ORDER BY error_count DESC
LIMIT 10;
Link
teams (organization := VARCHAR) 2 examples

Sentry teams of an organization, with member counts and project slugs

Named arguments
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
id VARCHAR
Team id.
slug VARCHAR
Team slug (#slug in Sentry search).
name VARCHAR
Team name.
created_at TIMESTAMP WITH TIME ZONE
When the team was created.
member_count INTEGER
Number of members.
is_member BOOLEAN
The token's user belongs to the team.
team_role VARCHAR
The token's user's role in the team (contributor, admin), if a member.
projects VARCHAR[]
Slugs of the projects the team owns.
Examples (2)

Teams by size

SELECT slug, member_count, projects
FROM sentry.main.teams()
ORDER BY member_count DESC;

One row per team and owned project

SELECT t.slug, p
FROM sentry.main.teams() t,
     unnest(t.projects) AS u(p)
ORDER BY t.slug, p;
Link
usage_stats (by_project := BOOLEAN, end_time := TIMESTAMP WITH TIME ZONE, interval := VARCHAR, organization := VARCHAR, start_time := TIMESTAMP WITH TIME ZONE, stats_period := VARCHAR) 2 examples

Sentry usage stats v2: accepted, filtered, rate-limited and dropped volume per category

Named arguments
by_project := BOOLEAN
Break usage down per project (named, default false). Sentry then returns totals for the whole window, not a time series. Β· default false
end_time := TIMESTAMP WITH TIME ZONE
Window end (named); defaults to now when only start_time is given. Β· default null
interval := VARCHAR
Bucket size (named): 1d (default) or 1h. Β· default "1d"
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
start_time := TIMESTAMP WITH TIME ZONE
Window start (named); with end_time replaces stats_period. Β· default null
stats_period := VARCHAR
Relative window (named), default 30d. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
time TIMESTAMP WITH TIME ZONE
Start of the bucket.
category VARCHAR
Data category: error, transaction, attachment, replay, profile, monitor, span …
outcome VARCHAR
accepted, filtered, rate_limited, invalid, abuse, client_discard, cardinality_limited.
reason VARCHAR
Why the item was filtered / dropped (NULL or 'none' when accepted).
project_id VARCHAR
Project id (NULL unless by_project := true or one project_id is filtered).
quantity BIGINT
Items (bytes for attachments) in the bucket.
Examples (2)

Volume per category and outcome over the last 30 days

SELECT category, outcome, sum(quantity) AS items
FROM sentry.main.usage_stats()
GROUP BY ALL
ORDER BY items DESC;

Rate-limited errors per day (outcome and category are sent to Sentry)

SELECT time, sum(quantity) AS dropped
FROM sentry.main.usage_stats()
WHERE outcome = 'rate_limited' AND category = 'error'
GROUP BY time
ORDER BY time;
Link
user_feedback (include_pii := BOOLEAN, organization := VARCHAR, project_slug := VARCHAR) 2 examples

Sentry user feedback per project (comments; names / emails only with include_pii := true)

Named arguments
include_pii := BOOLEAN
Return the reporter's name and email (named, default false). Only enable when you are allowed to process them. Β· default false
organization := VARCHAR
Organization slug (named). NULL uses the secret's ORGANIZATION, else every organization the token can see; a pushed WHERE organization = / IN (...) works the same way. Β· default null
project_slug := VARCHAR
Project slug (named). NULL reads every project of the organization (one call per project); a pushed WHERE project_slug = / IN (...) works the same way. Β· default null
Returns columns
organization VARCHAR
Slug of the Sentry organization the row belongs to.
project_slug VARCHAR
Project slug.
feedback_id VARCHAR
Feedback id.
comments VARCHAR
What the user wrote (free text; may contain personal data).
created_at TIMESTAMP WITH TIME ZONE
When the feedback was submitted.
event_id VARCHAR
Event the feedback is attached to.
issue_id VARCHAR
Issue of that event.
issue_short_id VARCHAR
Short id of that issue.
issue_title VARCHAR
Title of that issue.
name VARCHAR
Reporter's name (PII; NULL unless include_pii := true).
email VARCHAR
Reporter's email (PII; NULL unless include_pii := true).
Examples (2)

Issues with the most user feedback (no PII)

SELECT issue_short_id, count(*) AS reports
FROM sentry.main.user_feedback()
GROUP BY issue_short_id
ORDER BY reports DESC;

Latest feedback comments of one project

SELECT created_at, comments
FROM sentry.main.user_feedback(project_slug := 'frontend')
ORDER BY created_at DESC
LIMIT 20;
Link

Credentials

The secret type sentry declares, as reported by the worker itself.

sentry

How to get these credentials

A Sentry auth token plus the host (sentry.io, a us / de region, or self-hosted) and default organization

secret.sql
CREATE SECRET sentry (
    TYPE sentry,
    auth_token   '<AUTH_TOKEN>',  -- secret
    base_url     '<base_url>',
    region       '<region>',
    organization '<organization>'
);
Key Type Required Description
auth_token secret VARCHAR β€” Sentry auth token: an organization token (sntrys_…), a user token (sntryu_…) or an internal integration token, with read scopes (org:read, project:read, event:read, member:read, team:read, alerts:read).
base_url VARCHAR β€” Sentry host: https://sentry.io (default) or a self-hosted URL. http:// is accepted only for 127.0.0.1/localhost.
region VARCHAR β€” Data-residency region of a sentry.io organization: us or de (used when BASE_URL is not set).
organization VARCHAR β€” Default organization slug for functions called without organization :=.

The worker doesn't mark which keys are required.

Create the secret in the same session, after attaching sentry β€” the worker registers its secret types at ATTACH. Keys marked secret are masked in duckdb_secrets(); angle-bracket values are placeholders. Read credentials from your environment or secret store in your application and pass them through your SQL client’s parameter bindings. Keep real values out of saved SQL and history. Native DuckDB and Haybarn do not provide a SQL getenv() function.

Try these queries

issues_columns β€” The issues() result columns (binds only; create a sentry secret and drop LIMIT 0 for rows)

SELECT short_id, title, status, level, event_count, last_seen
FROM sentry.main.issues()
LIMIT 0;

Uses issues

discover_columns β€” discover() names its columns after the fields (binds only; needs a sentry secret for rows)

SELECT transaction, count, p95_transaction_duration
FROM sentry.main.discover('transactions', ['transaction', 'count()', 'p95(transaction.duration)'])
LIMIT 0;

Uses discover

Every organization

SELECT slug, name, region_url FROM sentry.main.organizations ORDER BY slug

Uses organizations

Projects per platform

SELECT platform, count(*) AS projects
FROM sentry.main.projects()
GROUP BY platform
ORDER BY projects DESC

Uses projects

Teams by size

SELECT slug, member_count, projects
FROM sentry.main.teams()
ORDER BY member_count DESC

Uses teams

Members per role

SELECT role, count(*) AS members
FROM sentry.main.members()
GROUP BY role
ORDER BY members DESC

Uses members

41 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • List the slugs of every Sentry organization the token can see.
  • In the acme Sentry organization, which unresolved issues have level fatal? Give their short ids.
  • Which acme issue has the most events? Give its short id and event count.
  • Which browser values appear in the tags of acme issue 4504001, and how many events each?
  • What is the innermost in-app stack frame of the latest event of acme issue 4504001?
  • Using Sentry Discover on the acme transactions dataset, which transaction has the most events?

Sentry is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.