From 7b78ba5f290425f9c9f8e6f02b70be965c432cda Mon Sep 17 00:00:00 2001 From: betegon Date: Fri, 6 Feb 2026 18:26:43 +0100 Subject: [PATCH 1/3] docs(log): add documentation for sentry log view command --- docs/src/content/docs/commands/log.md | 89 +++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/docs/src/content/docs/commands/log.md b/docs/src/content/docs/commands/log.md index c19d60e8..d521e189 100644 --- a/docs/src/content/docs/commands/log.md +++ b/docs/src/content/docs/commands/log.md @@ -92,6 +92,95 @@ sentry log list -n 500 sentry log list my-org/backend -f -q 'level:error' ``` +### `sentry log view` + +View details of a specific log entry. + +```bash +# Auto-detect from DSN or config +sentry log view + +# Explicit org and project +sentry log view / + +# Search for project across all accessible orgs +sentry log view +``` + +**Arguments:** + +| Argument | Description | +|----------|-------------| +| `` | The 32-character hexadecimal log ID | +| `/` | Explicit organization and project (e.g., `my-org/backend`) | +| `` | Search for project by name across all accessible organizations | + +**Options:** + +| Option | Description | +|--------|-------------| +| `-w, --web` | Open in browser | +| `--json` | Output as JSON | + +**Example:** + +```bash +sentry log view 968c763c740cfda8b6728f27fb9e9b01 +``` + +``` +Log 968c763c740c... +════════════════════ + +ID: 968c763c740cfda8b6728f27fb9e9b01 +Timestamp: 2024-01-20 14:22:05 +Severity: ERROR + +Message: + Database connection timeout after 30s + +─── Context ─── + +Project: backend +Environment: production +Release: 1.2.3 + +─── SDK ─── + +SDK: sentry.python 1.40.0 + +─── Trace ─── + +Trace ID: abc123def456abc123def456abc12345 +Span ID: 1234567890abcdef +Link: https://sentry.io/organizations/my-org/explore/traces/abc123... + +─── Source Location ─── + +Function: connect_to_database +File: src/db/connection.py:142 +``` + +**Open in browser:** + +```bash +sentry log view 968c763c740cfda8b6728f27fb9e9b01 -w +``` + +**With explicit project:** + +```bash +sentry log view my-org/backend 968c763c740cfda8b6728f27fb9e9b01 +``` + +## Finding Log IDs + +Log IDs can be found: + +1. In the output of `sentry log list` (shown as trace IDs in brackets) +2. In the Sentry UI when viewing log entries +3. In the `sentry.item_id` field of JSON output + ## JSON Output Use `--json` for machine-readable output: From 8e7c31a4e00b9f87e9775814a6a9f316ab22e887 Mon Sep 17 00:00:00 2001 From: betegon Date: Fri, 6 Feb 2026 18:30:58 +0100 Subject: [PATCH 2/3] docs(skill): add examples for sentry log view command --- plugins/sentry-cli/skills/sentry-cli/SKILL.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/plugins/sentry-cli/skills/sentry-cli/SKILL.md b/plugins/sentry-cli/skills/sentry-cli/SKILL.md index 27ba91c3..9b26a1e2 100644 --- a/plugins/sentry-cli/skills/sentry-cli/SKILL.md +++ b/plugins/sentry-cli/skills/sentry-cli/SKILL.md @@ -471,6 +471,31 @@ View details of a specific log entry - `--json - Output as JSON` - `-w, --web - Open in browser` +**Examples:** + +```bash +# Auto-detect from DSN or config +sentry log view + +# Explicit org and project +sentry log view / + +# Search for project across all accessible orgs +sentry log view + +# View a specific log entry +sentry log view 968c763c740cfda8b6728f27fb9e9b01 + +# With explicit project +sentry log view my-org/backend 968c763c740cfda8b6728f27fb9e9b01 + +# Open in browser +sentry log view 968c763c740cfda8b6728f27fb9e9b01 -w + +# Output as JSON +sentry log view 968c763c740cfda8b6728f27fb9e9b01 --json +``` + ### Issues List issues in a project From 1db8cfc782d0512cc004125ef0d157c449b66169 Mon Sep 17 00:00:00 2001 From: betegon Date: Fri, 6 Feb 2026 18:34:59 +0100 Subject: [PATCH 3/3] chore: regenerate SKILL.md --- plugins/sentry-cli/skills/sentry-cli/SKILL.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/plugins/sentry-cli/skills/sentry-cli/SKILL.md b/plugins/sentry-cli/skills/sentry-cli/SKILL.md index 9b26a1e2..c3376949 100644 --- a/plugins/sentry-cli/skills/sentry-cli/SKILL.md +++ b/plugins/sentry-cli/skills/sentry-cli/SKILL.md @@ -459,8 +459,6 @@ sentry log list -n 500 # Stream error logs from a specific project sentry log list my-org/backend -f -q 'level:error' - -sentry log list --json | jq '.[] | select(.level == "error")' ``` #### `sentry log view ` @@ -483,17 +481,13 @@ sentry log view / # Search for project across all accessible orgs sentry log view -# View a specific log entry sentry log view 968c763c740cfda8b6728f27fb9e9b01 -# With explicit project -sentry log view my-org/backend 968c763c740cfda8b6728f27fb9e9b01 - -# Open in browser sentry log view 968c763c740cfda8b6728f27fb9e9b01 -w -# Output as JSON -sentry log view 968c763c740cfda8b6728f27fb9e9b01 --json +sentry log view my-org/backend 968c763c740cfda8b6728f27fb9e9b01 + +sentry log list --json | jq '.[] | select(.level == "error")' ``` ### Issues