Skip to content

Commit 74898e8

Browse files
feat(release): surface adoption and health metrics in list and view (#463) (#680)
## Summary - Add per-project health/adoption data to `release list` and `release view` commands - Pass `health=1` to the releases API so adoption and crash-free metrics are populated - Add ADOPTION and CRASH-FREE columns to the list table; add per-project health breakdown to view - Closes #463 ## Changes **API layer** (`src/lib/api/releases.ts`): - `listReleasesPaginated` gains `health?: boolean` option - `getRelease` gains optional `{ health, adoptionStages, healthStatsPeriod }` query params - Export `ReleaseSortValue` type for future `--sort` support **List command** (`src/commands/release/list.ts`): - Always requests `health=1` in both `listForOrg` and `listPaginated` - Replaces STATUS/RELEASED columns with ADOPTION/CRASH-FREE/ISSUES columns - Health data extracted from first project with `hasHealthData: true` **View command** (`src/commands/release/view.ts`): - Requests `health=true, adoptionStages=true` on every view - Adds "Health by Project" table section with per-project metrics - Color-coded crash-free rates (green ≥99%, yellow ≥95%, red <95%) - Section gracefully omitted when no project has session data **Tests** (`test/commands/release/view.test.ts`): - Health data rendering (human mode): checks section header, project slugs, percentages - Health data in JSON: verifies `projects[].healthData` fields pass through - No-health fallback: verifies section is omitted when `hasHealthData: false` --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 419a033 commit 74898e8

File tree

12 files changed

+1201
-126
lines changed

12 files changed

+1201
-126
lines changed

docs/src/fragments/commands/log.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
32
## Examples
43

54
### List logs

plugins/sentry-cli/skills/sentry-cli/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ Manage Sentry dashboards
346346

347347
Work with Sentry releases
348348

349-
- `sentry release list <org/project>` — List releases
350-
- `sentry release view <org/version...>` — View release details
349+
- `sentry release list <org/project>` — List releases with adoption and health metrics
350+
- `sentry release view <org/version...>` — View release details with health metrics
351351
- `sentry release create <org/version...>` — Create a release
352352
- `sentry release finalize <org/version...>` — Finalize a release
353353
- `sentry release delete <org/version...>` — Delete a release

plugins/sentry-cli/skills/sentry-cli/references/release.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@ Work with Sentry releases
1313

1414
### `sentry release list <org/project>`
1515

16-
List releases
16+
List releases with adoption and health metrics
1717

1818
**Flags:**
1919
- `-n, --limit <value> - Maximum number of releases to list - (default: "25")`
20+
- `-s, --sort <value> - Sort: date, sessions, users, crash_free_sessions (cfs), crash_free_users (cfu) - (default: "date")`
21+
- `-e, --environment <value>... - Filter by environment (repeatable, comma-separated)`
22+
- `-t, --period <value> - Health stats period (e.g., 24h, 7d, 14d, 90d) - (default: "90d")`
23+
- `--status <value> - Filter by status: open (default) or archived - (default: "open")`
2024
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`
2125
- `-c, --cursor <value> - Navigate pages: "next", "prev", "first" (or raw cursor string)`
2226

2327
### `sentry release view <org/version...>`
2428

25-
View release details
29+
View release details with health metrics
2630

2731
**Flags:**
2832
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`

0 commit comments

Comments
 (0)