-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat(replay): Add first-class replay querying and inspection #904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
43ec836
feat(replay): Add replay list and view commands
dcramer 5d25a37
fix(replay): Address replay validation drift
dcramer 1d75923
feat(replay): Improve replay lookup and linkage
dcramer 5a869b4
ref(replay): Simplify replay schema typing
dcramer 6fbefb5
feat(replay): Expand replay querying and inspection
dcramer 0a182b2
fix(replay): Normalize replay field fallbacks
dcramer 663d594
ref(replay): Share replay environment parsing
dcramer 2b1f63b
fix(replay): Address replay review feedback
dcramer 1f7cb8b
fix(replay): Tighten replay follow-up behavior
dcramer 68bd9ed
fix(replay): Clean up replay review feedback
dcramer eb5bf8a
fix(replay): Correct replay field and activity timing
dcramer 90a6a1f
fix(replay): Tighten replay explore field handling
dcramer bcc5540
fix(replay): Separate replay aliases from convenience fields
dcramer cf62b16
fix(replay): Validate replay IDs in parsed URLs
dcramer 4d26542
fix(replay): Tighten replay URL and hint defaults
dcramer 39230db
fix(replay): Preserve org context for replay listing URLs
dcramer 8d1e027
fix(replay): Reuse the shared replay list period default
dcramer e771a23
fix(replay): Format replay URL parser test coverage
dcramer 6c7e2be
fix(replay): Normalize replay query and ID handling
dcramer 3b36311
fix(replay): Normalize replay URLs and list fields
dcramer 9ce3297
fix(replay): Reject extra replay view args
dcramer 71606e7
ref(replay): consolidate replay-duration and replay-id into shared ut…
BYK d598cb5
ref(replay): extract formatting helpers and address review findings
BYK dea9eb4
fix(replay): address review bot findings
BYK d505e54
ref(explore): centralize replay dataset branching into resolveDataset…
BYK 60f66a4
docs: add missing JSDoc to replay search, explore, and view internals
BYK File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
|
|
||
| ## Examples | ||
|
|
||
| ### List replays | ||
|
|
||
| ```bash | ||
| # List recent replays for a project | ||
| sentry replay list my-org/frontend | ||
|
|
||
| # Search across all projects in an org | ||
| sentry replay list my-org/ --query "environment:production" | ||
|
|
||
| # Change the time window and sort | ||
| sentry replay list my-org/frontend --period 24h --sort errors | ||
|
|
||
| # Paginate through results | ||
| sentry replay list my-org/frontend -c next | ||
| sentry replay list my-org/frontend -c prev | ||
|
|
||
| # Output machine-readable data | ||
| sentry replay list my-org/frontend --json | ||
| ``` | ||
|
|
||
| ### View a replay | ||
|
|
||
| ```bash | ||
| # View a replay by ID using auto-detected org/project context | ||
| sentry replay view 346789a703f6454384f1de473b8b9fcc | ||
|
|
||
| # View a replay with an explicit org | ||
| sentry replay view my-org/346789a703f6454384f1de473b8b9fcc | ||
|
|
||
| # View a replay with explicit org/project context | ||
| sentry replay view my-org/frontend/346789a703f6454384f1de473b8b9fcc | ||
|
|
||
| # Open a replay in the browser | ||
| sentry replay view my-org/346789a703f6454384f1de473b8b9fcc --web | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 148 additions & 0 deletions
148
plugins/sentry-cli/skills/sentry-cli/references/replay.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| --- | ||
| name: sentry-cli-replay | ||
| version: 0.32.0-dev.0 | ||
| description: Search and inspect Session Replays | ||
| requires: | ||
| bins: ["sentry"] | ||
| auth: true | ||
| --- | ||
|
|
||
| # Replay Commands | ||
|
|
||
| Search and inspect Session Replays | ||
|
|
||
| ### `sentry replay list <org/project>` | ||
|
|
||
| List recent Session Replays | ||
|
|
||
| **Flags:** | ||
| - `-n, --limit <value> - Number of replays (1-1000) - (default: "25")` | ||
| - `-q, --query <value> - Search query (Sentry replay search syntax)` | ||
| - `-e, --environment <value>... - Filter by environment (repeatable, comma-separated)` | ||
| - `-s, --sort <value> - Sort by: date, oldest, duration, errors, activity, or a raw replay sort field - (default: "date")` | ||
| - `-t, --period <value> - Time range: "7d", "2026-04-01..2026-05-01", ">=2026-04-01" - (default: "7d")` | ||
| - `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data` | ||
| - `-c, --cursor <value> - Navigate pages: "next", "prev", "first" (or raw cursor string)` | ||
|
|
||
| **JSON Fields** (use `--json --fields` to select specific fields): | ||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
| | `activity` | number \| null | Replay activity score | | ||
| | `browser` | object \| null | Browser metadata | | ||
| | `count_dead_clicks` | number \| null | Dead click count | | ||
| | `count_errors` | number \| null | Associated error count | | ||
| | `count_infos` | number \| null | Info event count | | ||
| | `count_rage_clicks` | number \| null | Rage click count | | ||
| | `count_segments` | number \| null | Recording segment count | | ||
| | `count_urls` | number \| null | Visited URL count | | ||
| | `count_warnings` | number \| null | Warning event count | | ||
| | `device` | object \| null | Device metadata | | ||
| | `dist` | string \| null | Distribution | | ||
| | `duration` | number \| null | Replay duration in seconds | | ||
| | `environment` | string \| null | Environment | | ||
| | `error_ids` | array | Linked error IDs | | ||
| | `finished_at` | string \| null | Replay finish timestamp | | ||
| | `has_viewed` | boolean \| null | Whether the current user has viewed the replay | | ||
| | `id` | string | Replay ID | | ||
| | `info_ids` | array | Linked info event IDs | | ||
| | `is_archived` | boolean \| null | Archived flag | | ||
| | `os` | object \| null | Operating system metadata | | ||
| | `ota_updates` | object \| null | OTA update metadata | | ||
| | `platform` | string \| null | Platform | | ||
| | `project_id` | string \| null | Numeric project ID | | ||
| | `releases` | array | Associated releases | | ||
| | `sdk` | object \| null | SDK metadata | | ||
| | `started_at` | string \| null | Replay start timestamp | | ||
| | `tags` | unknown | Replay tags | | ||
| | `trace_ids` | array | Linked trace IDs | | ||
| | `urls` | array | Visited URLs | | ||
| | `user` | object \| null | User metadata | | ||
| | `warning_ids` | array | Linked warning event IDs | | ||
|
|
||
| **Examples:** | ||
|
|
||
| ```bash | ||
| # List recent replays for a project | ||
| sentry replay list my-org/frontend | ||
|
|
||
| # Search across all projects in an org | ||
| sentry replay list my-org/ --query "environment:production" | ||
|
|
||
| # Change the time window and sort | ||
| sentry replay list my-org/frontend --period 24h --sort errors | ||
|
|
||
| # Paginate through results | ||
| sentry replay list my-org/frontend -c next | ||
| sentry replay list my-org/frontend -c prev | ||
|
|
||
| # Output machine-readable data | ||
| sentry replay list my-org/frontend --json | ||
| ``` | ||
|
|
||
| ### `sentry replay view <replay-id-or-url...>` | ||
|
|
||
| View a Session Replay | ||
|
|
||
| **Flags:** | ||
| - `-w, --web - Open in browser` | ||
| - `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data` | ||
|
|
||
| **JSON Fields** (use `--json --fields` to select specific fields): | ||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
| | `activity` | array | Summarized replay activity | | ||
| | `browser` | object \| null | Browser metadata | | ||
| | `count_dead_clicks` | number \| null | Dead click count | | ||
| | `count_errors` | number \| null | Associated error count | | ||
| | `count_infos` | number \| null | Info event count | | ||
| | `count_rage_clicks` | number \| null | Rage click count | | ||
| | `count_segments` | number \| null | Recording segment count | | ||
| | `count_urls` | number \| null | Visited URL count | | ||
| | `count_warnings` | number \| null | Warning event count | | ||
| | `device` | object \| null | Device metadata | | ||
| | `dist` | string \| null | Distribution | | ||
| | `duration` | number \| null | Replay duration in seconds | | ||
| | `environment` | string \| null | Environment | | ||
| | `error_ids` | array | Linked error IDs | | ||
| | `finished_at` | string \| null | Replay finish timestamp | | ||
| | `has_viewed` | boolean \| null | Whether the current user has viewed the replay | | ||
| | `id` | string | Replay ID | | ||
| | `info_ids` | array | Linked info event IDs | | ||
| | `is_archived` | boolean \| null | Archived flag | | ||
| | `os` | object \| null | Operating system metadata | | ||
| | `ota_updates` | object \| null | OTA update metadata | | ||
| | `platform` | string \| null | Platform | | ||
| | `project_id` | string \| null | Numeric project ID | | ||
| | `releases` | array | Associated releases | | ||
| | `sdk` | object \| null | SDK metadata | | ||
| | `started_at` | string \| null | Replay start timestamp | | ||
| | `tags` | unknown | Replay tags | | ||
| | `trace_ids` | array | Linked trace IDs | | ||
| | `urls` | array | Visited URLs | | ||
| | `user` | object \| null | User metadata | | ||
| | `warning_ids` | array | Linked warning event IDs | | ||
| | `clicks` | array | Replay click summaries | | ||
| | `replay_type` | string \| null | Replay type | | ||
| | `org` | string | Organization slug | | ||
| | `relatedIssues` | array | Replay-related issues | | ||
| | `relatedTraces` | array | Replay-related traces | | ||
|
|
||
| **Examples:** | ||
|
|
||
| ```bash | ||
| # View a replay by ID using auto-detected org/project context | ||
| sentry replay view 346789a703f6454384f1de473b8b9fcc | ||
|
|
||
| # View a replay with an explicit org | ||
| sentry replay view my-org/346789a703f6454384f1de473b8b9fcc | ||
|
|
||
| # View a replay with explicit org/project context | ||
| sentry replay view my-org/frontend/346789a703f6454384f1de473b8b9fcc | ||
|
|
||
| # Open a replay in the browser | ||
| sentry replay view my-org/346789a703f6454384f1de473b8b9fcc --web | ||
| ``` | ||
|
|
||
| All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.