-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Summary
The CLI has no release command group today. Users who want to inspect release adoption and health metrics — crash-free rate, user/session adoption percentage, session counts — must use the web UI or reach the API directly. Adding a release command group starting with adoption/health visibility addresses a clear workflow gap for teams monitoring rollouts from the terminal or CI environments.
Current Behavior
The CLI covers issues, events, traces, spans, logs, dashboards, and projects but has no release subcommand surface (src/commands/ has no releases module). There is also no corresponding entry in src/lib/api/ for releases.
The MCP's find_releases tool returns basic metadata (version, dates, deploy info, new issue count) but explicitly omits health/adoption data — the ReleaseSchema has no healthData or adoption fields even though the Sentry API supports them.
Gap
The GET /api/0/organizations/{org}/releases/ endpoint supports ?health=1&adoptionStages=1 query params that return per-project health snapshots:
{
adoption: 42.3,
sessionsAdoption: 38.1,
crashFreeUsers: 99.1,
crashFreeSessions: 98.7,
totalUsers24h: 10200,
totalSessions24h: 52000,
hasHealthData: true
}These fields are fully populated by release_health (Snuba-backed) and serialized in src/sentry/api/serializers/models/release.py. None of this is reachable via the CLI today.
Options
Option A — sentry release list + sentry release view
Model after existing command groups (e.g. issue, project). list returns versions with adoption % and crash-free rates in a table. view fetches full health detail for a single version. Start with ?health=1 on the list endpoint; surface adoptionStages in view.
Option B — Focused sentry release adoption subcommand
Narrower scope: a single subcommand that takes a version (or defaults to latest) and prints adoption metrics. Simpler to ship but less composable.
Option C — Extend sentry releases to mirror sentry-cli releases (old Rust CLI)
The legacy Rust-based sentry-cli has a releases group focused on source map upload and deploy tracking, not health queries. Merging those semantics would widen scope significantly. Probably not the right move here — keep this focused on read/inspect workflows.
Recommendation
Start with Option A (sentry release list + sentry release view) following the existing command-group pattern. Introduce src/lib/api/releases.ts with listReleases calling ?health=1 and ?adoptionStages=1, add table formatting for list (version, adoption %, crash-free users/sessions), and detailed output for view. Can be wired to the AI tool layer later.
Related: getsentry/sentry-mcp#846 — user request for release adoption visibility that prompted this exploration.
Action taken on behalf of David Cramer.