sentry
Original:🇺🇸 English
Translated
6 scripts
Fetch and analyze Sentry issues, events, transactions, and logs. Helps agents debug errors, find root causes, and understand what happened at specific times.
7installs
Sourcemitsuhiko/agent-stuff
Added on
NPX Install
npx skill4agent add mitsuhiko/agent-stuff sentryTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Sentry Skill
Access Sentry data via the API for debugging and investigation. Uses auth token from .
~/.sentryclircQuick Reference
| Task | Command |
|---|---|
| Find errors on a date | |
| List open issues | |
| Get issue details | |
| Get event details | |
| Search logs | |
Common Debugging Workflows
"What went wrong at this time?"
Find events around a specific timestamp:
bash
# Find all events in a 2-hour window
./scripts/search-events.js --org myorg --project backend \
--start 2025-12-23T15:00:00 --end 2025-12-23T17:00:00
# Filter to just errors
./scripts/search-events.js --org myorg --start 2025-12-23T15:00:00 \
--level error
# Find a specific transaction type
./scripts/search-events.js --org myorg --start 2025-12-23T15:00:00 \
--transaction process-incoming-email"What errors have occurred recently?"
bash
# List unresolved errors from last 24 hours
./scripts/list-issues.js --org myorg --status unresolved --level error --period 24h
# Find high-frequency issues
./scripts/list-issues.js --org myorg --query "times_seen:>50" --sort freq
# Issues affecting users
./scripts/list-issues.js --org myorg --query "is:unresolved has:user" --sort user"Get details about a specific issue/event"
bash
# Get issue with latest stack trace
./scripts/fetch-issue.js 5765604106 --latest
./scripts/fetch-issue.js https://sentry.io/organizations/myorg/issues/123/ --latest
./scripts/fetch-issue.js MYPROJ-123 --org myorg --latest
# Get specific event with all breadcrumbs
./scripts/fetch-event.js abc123def456 --org myorg --project backend --breadcrumbs"Find events with a specific tag"
bash
# Find by custom tag (e.g., thread_id, user_id)
./scripts/search-events.js --org myorg --tag thread_id:th_abc123
# Find by user email
./scripts/search-events.js --org myorg --query "user.email:*@example.com"Fetch Issue
bash
./scripts/fetch-issue.js <issue-id-or-url> [options]Get details about a specific issue (grouped error).
Accepts:
- Issue ID:
5765604106 - Issue URL:
https://sentry.io/organizations/sentry/issues/5765604106/ - New URL format:
https://myorg.sentry.io/issues/5765604106/ - Short ID: (requires
JAVASCRIPT-ABCflag)--org
Options:
- - Include the latest event with full stack trace
--latest - - Organization slug (for short IDs)
--org <org> - - Output raw JSON
--json
Output includes:
- Title, culprit, status, level
- First/last seen timestamps
- Event count and user impact
- Tags and environment info
- With : stack trace, request details, breadcrumbs, runtime context
--latest
Fetch Event
bash
./scripts/fetch-event.js <event-id> --org <org> --project <project> [options]Get full details of a specific event by its ID.
Options:
- - Organization slug (required)
--org, -o <org> - - Project slug (required)
--project, -p <project> - - Show all breadcrumbs (default: last 30)
--breadcrumbs, -b - - Show span tree for transactions
--spans - - Output raw JSON
--json
Output includes:
- Timestamp, project, title, message
- All tags
- Context (runtime, browser, OS, trace info)
- Request details
- Exception with stack trace
- Breadcrumbs
- Spans (with )
--spans
Search Events
bash
./scripts/search-events.js [options]Search for events (transactions, errors) using Sentry Discover.
Time Range Options:
- - Relative time (24h, 7d, 14d)
--period, -t <period> - - Start time (ISO 8601: 2025-12-23T15:00:00)
--start <datetime> - - End time (ISO 8601)
--end <datetime>
Filter Options:
- - Organization slug (required)
--org, -o <org> - - Project slug or ID
--project, -p <project> - - Discover search query
--query, -q <query> - - Transaction name filter
--transaction <name> - - Tag filter (repeatable)
--tag <key:value> - - Level filter (error, warning, info)
--level <level> - - Max results (default: 25, max: 100)
--limit, -n <n> - - Comma-separated fields to include
--fields <fields>
Query Syntax:
transaction:process-* Wildcard transaction match
level:error Filter by level
user.email:foo@bar.com Filter by user
environment:production Filter by environment
has:stack.filename Has stack traceList Issues
bash
./scripts/list-issues.js [options]List and search issues (grouped errors) in a project.
Options:
- - Organization slug (required)
--org, -o <org> - - Project slug (repeatable)
--project, -p <project> - - Issue search query
--query, -q <query> - - unresolved, resolved, ignored
--status <status> - - error, warning, info, fatal
--level <level> - - Time period (default: 14d)
--period, -t <period> - - Max results (default: 25)
--limit, -n <n> - - date, new, priority, freq, user
--sort <sort> - - Output raw JSON
--json
Query Syntax:
is:unresolved Status filter
is:assigned Has assignee
assigned:me Assigned to current user
level:error Level filter
firstSeen:+7d First seen > 7 days ago
lastSeen:-24h Last seen within 24h
times_seen:>100 Event count filter
has:user Has user context
error.handled:0 Unhandled errors onlySearch Logs
bash
./scripts/search-logs.js [query|url] [options]Search for logs in Sentry's Logs Explorer.
Options:
- - Organization slug (required unless URL provided)
--org, -o <org> - - Filter by project slug or ID
--project, -p <project> - - Time period (default: 24h)
--period, -t <period> - - Max results (default: 100, max: 1000)
--limit, -n <n> - - Output raw JSON
--json
Query Syntax:
level:error Filter by level (trace, debug, info, warn, error, fatal)
message:*timeout* Search message text with wildcards
trace:abc123 Filter by trace ID
project:my-project Filter by project slugAccepts Sentry URLs:
bash
./scripts/search-logs.js "https://myorg.sentry.io/explore/logs/?project=123&statsPeriod=7d"Tips for Debugging
-
Start broad, then narrow down: Usewith a time range first, then drill into specific events
search-events.js -
Use breadcrumbs: Theflag on
--breadcrumbsshows the full history of what happened before an errorfetch-event.js -
Look for patterns: Useto find frequently occurring problems
list-issues.js --sort freq -
Check related events: If you find one event, look for others with the same transaction name or trace ID
-
Tags are your friend: Custom tags like,
thread_id,user_idhelp correlate eventsrequest_id