Loading...
Loading...
Use when given a Sentry issue URL and you need to fetch exception details, stacktrace, and request context using sentry-cli (and Sentry API fallback when needed).
npx skill4agent add buildrtech/dotagents sentry-issuesentry-clisentry-cliapicurlhttps://buildrtech.sentry.io/issues/7261708580/?environment=demo&project=4510025524707328buildrtech72617085804510025524707328demosentry-cli --version
sentry-cli info
sentry-cli organizations list
sentry-cli projects list --org <org_slug>sentry-cliapisentry-cli --helpsentry-cliTOKEN=$(rg '^token=' ~/.sentryclirc | head -n1 | cut -d'=' -f2-)curl -sS -H "Authorization: Bearer $TOKEN" \
"https://sentry.io/api/0/issues/<issue_id>/"curl -sS -H "Authorization: Bearer $TOKEN" \
"https://sentry.io/api/0/issues/<issue_id>/events/latest/?environment=<env>"curl -sS -H "Authorization: Bearer $TOKEN" \
"https://sentry.io/api/0/issues/<issue_id>/events/?environment=<env>"curl -sS -H "Authorization: Bearer $TOKEN" \
"https://sentry.io/api/0/issues/<issue_id>/events/<event_id>/?environment=<env>"## Sentry Issue: <title>
- Issue ID: <id>
- Env: <env>
- Level: <level>
- Status: <status>
- First seen: <timestamp>
- Last seen: <timestamp>
- Occurrences: <count>
### Error
- Type: <exception class>
- Message: <message>
- Culprit: <culprit>
### In-app stacktrace highlights
- path/to/file.rb:123 in `method_name`
- ...
### Request/Job context
- Route/URL: <...>
- Key params: <...>
- User: <...>
- Release: <...>
### Root cause hypothesis
<why this fails based on evidence>
### Recommended fix
<where to handle and why>sentry-cli api# Auth/context
sentry-cli info
sentry-cli organizations list
sentry-cli projects list --org <org>
# Token from CLI config
TOKEN=$(rg '^token=' ~/.sentryclirc | head -n1 | cut -d'=' -f2-)
# Issue
curl -sS -H "Authorization: Bearer $TOKEN" "https://sentry.io/api/0/issues/<issue_id>/"
# Latest event
curl -sS -H "Authorization: Bearer $TOKEN" "https://sentry.io/api/0/issues/<issue_id>/events/latest/?environment=<env>"
# Event list
curl -sS -H "Authorization: Bearer $TOKEN" "https://sentry.io/api/0/issues/<issue_id>/events/?environment=<env>"