Summary
sentry issue list --json --fields count,firstSeen,lastSeen,userCount silently omits those fields from the output, even though --help documents them as available:
--fields Comma-separated fields to include in JSON output (dot.notation supported).
Available: id, shortId, title, culprit, count, userCount, firstSeen, lastSeen, level, status,
permalink, project, metadata, assignedTo, priority, platform, substatus, isUnhandled, seerFixabilityScore
Steps to Reproduce
# These fields are NOT returned despite being listed as "available":
sentry issue list my-org/my-project \
--query "is:unresolved" \
--limit 3 --json \
--fields shortId,title,level,count,userCount,firstSeen,lastSeen,culprit
# Output — count, userCount, firstSeen, lastSeen are missing:
{
"data": [
{
"shortId": "MY-PROJECT-ABC",
"title": "Some Error",
"level": "error",
"culprit": "MyController#action"
}
]
}
Root Cause
The underlying Sentry API requires expand=stats on the issues endpoint to return count, userCount, firstSeen, and lastSeen. The CLI's issue list command does not pass this parameter.
Workaround — using sentry api directly confirms the fields exist when expand=stats is present:
sentry api 'projects/my-org/my-project/issues/?query=is%3Aunresolved%20age%3A-30d&limit=3&expand=stats' --json \
| jq '.[0] | {shortId, title, count, userCount, firstSeen, lastSeen}'
# Returns all fields correctly:
{
"shortId": "MY-PROJECT-ABC",
"title": "Some Error",
"count": "15",
"userCount": 2,
"firstSeen": "2026-05-12T16:16:34.930604Z",
"lastSeen": "2026-05-15T15:05:06.603517Z"
}
Additional Context
- The table output also shows
EVENTS: ? and SEEN: — for the same reason
--fresh does not change the behavior
- CLI version: latest (installed today, May 2026)
- The
@sentry/mcp-server does return these fields (it likely passes expand=stats under the hood), but the CLI does not
Expected Behavior
When --fields includes count, firstSeen, lastSeen, or userCount, the CLI should automatically add expand=stats to the API request so those fields are populated in the response.
Impact
This makes sentry issue list --json unsuitable for automation that needs event counts or timestamps — users must fall back to raw sentry api calls with manual URL encoding.
Summary
sentry issue list --json --fields count,firstSeen,lastSeen,userCountsilently omits those fields from the output, even though--helpdocuments them as available:Steps to Reproduce
Root Cause
The underlying Sentry API requires
expand=statson the issues endpoint to returncount,userCount,firstSeen, andlastSeen. The CLI'sissue listcommand does not pass this parameter.Workaround — using
sentry apidirectly confirms the fields exist whenexpand=statsis present:Additional Context
EVENTS: ?andSEEN: —for the same reason--freshdoes not change the behavior@sentry/mcp-serverdoes return these fields (it likely passesexpand=statsunder the hood), but the CLI does notExpected Behavior
When
--fieldsincludescount,firstSeen,lastSeen, oruserCount, the CLI should automatically addexpand=statsto the API request so those fields are populated in the response.Impact
This makes
sentry issue list --jsonunsuitable for automation that needs event counts or timestamps — users must fall back to rawsentry apicalls with manual URL encoding.