Loading...
Loading...
Fetch and analyze Sentry issues, events, transactions, and logs. Helps agents debug errors, find root causes, and understand what happened at specific times.
npx skill4agent add mitsuhiko/agent-commands sentry~/.sentryclirc| Task | Command |
|---|---|
| Find errors on a date | |
| List open issues | |
| Get issue details | |
| Get event details | |
| Search logs | |
# 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# 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 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 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"./scripts/fetch-issue.js <issue-id-or-url> [options]5765604106https://sentry.io/organizations/sentry/issues/5765604106/https://myorg.sentry.io/issues/5765604106/JAVASCRIPT-ABC--org--latest--org <org>--json--latest./scripts/fetch-event.js <event-id> --org <org> --project <project> [options]--org, -o <org>--project, -p <project>--breadcrumbs, -b--spans--json--spans./scripts/search-events.js [options]--period, -t <period>--start <datetime>--end <datetime>--org, -o <org>--project, -p <project>--query, -q <query>--transaction <name>--tag <key:value>--level <level>--limit, -n <n>--fields <fields>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 trace./scripts/list-issues.js [options]--org, -o <org>--project, -p <project>--query, -q <query>--status <status>--level <level>--period, -t <period>--limit, -n <n>--sort <sort>--jsonis: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 only./scripts/search-logs.js [query|url] [options]--org, -o <org>--project, -p <project>--period, -t <period>--limit, -n <n>--jsonlevel: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 slug./scripts/search-logs.js "https://myorg.sentry.io/explore/logs/?project=123&statsPeriod=7d"search-events.js--breadcrumbsfetch-event.jslist-issues.js --sort freqthread_iduser_idrequest_id