@sentry/junior-sentry 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/package.json +1 -1
- package/skills/sentry/SKILL.md +13 -5
- package/skills/sentry/SOURCES.md +48 -0
- package/skills/sentry/SPEC.md +95 -0
- package/skills/sentry/references/cli-commands.md +101 -8
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @sentry/junior-sentry
|
|
2
2
|
|
|
3
|
-
`@sentry/junior-sentry` adds Sentry
|
|
3
|
+
`@sentry/junior-sentry` adds read-only Sentry investigation workflows to Junior via per-user OAuth.
|
|
4
4
|
|
|
5
5
|
Install it alongside `@sentry/junior`:
|
|
6
6
|
|
|
@@ -8,4 +8,18 @@ Install it alongside `@sentry/junior`:
|
|
|
8
8
|
pnpm add @sentry/junior @sentry/junior-sentry
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Sentry CLI Surface
|
|
12
|
+
|
|
13
|
+
The plugin installs the npm `sentry` package as a runtime dependency and injects the current user's OAuth token as `SENTRY_AUTH_TOKEN` for Sentry skill commands.
|
|
14
|
+
|
|
15
|
+
As of 2026-04-30, `sentry@latest` is `0.30.0`. The verified command groups used by the bundled skill are:
|
|
16
|
+
|
|
17
|
+
- `sentry issue list|events|explain|plan|view`
|
|
18
|
+
- `sentry org list|view`
|
|
19
|
+
- `sentry log list|view`
|
|
20
|
+
- `sentry trace list|view|logs`
|
|
21
|
+
- `sentry api <endpoint>`
|
|
22
|
+
|
|
23
|
+
The skill must verify live `sentry --help` output before declaring a Sentry data surface unavailable. Prefer singular command groups such as `sentry org list`; do not use stale forms such as `sentry organizations list`.
|
|
24
|
+
|
|
11
25
|
Full setup guide: https://junior.sentry.dev/extend/sentry-plugin/
|
package/package.json
CHANGED
package/skills/sentry/SKILL.md
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sentry
|
|
3
|
-
description: Query live Sentry telemetry
|
|
3
|
+
description: Query live Sentry telemetry with the Sentry CLI and generate Sentry deep links. Use when users ask to investigate Sentry issues, events, logs, traces, organizations, projects, replays, or authenticated Sentry API data. Do not use it for repository/source-code/PR tasks, even when the topic concerns Sentry products.
|
|
4
4
|
allowed-tools: bash
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Sentry Operations
|
|
8
8
|
|
|
9
|
-
Use this skill for Sentry investigation workflows in the harness.
|
|
9
|
+
Use this skill for live Sentry investigation workflows in the harness.
|
|
10
|
+
|
|
11
|
+
Before declaring a Sentry data surface unavailable, verify the current CLI help:
|
|
12
|
+
|
|
13
|
+
- Run `sentry --help` for top-level command groups.
|
|
14
|
+
- Run `sentry <command> --help` or `sentry help <command>` before using a command shape from memory.
|
|
15
|
+
- If a remembered plural command fails, check for the current singular command group before blocking. Prefer canonical forms such as `sentry issue list`, `sentry org list`, `sentry log list`, and `sentry trace list`.
|
|
10
16
|
|
|
11
17
|
## Workflow
|
|
12
18
|
|
|
13
19
|
1. Confirm operation and target:
|
|
14
20
|
|
|
15
|
-
- Determine operation:
|
|
21
|
+
- Determine operation: issue, event, log, trace, org, project, replay/deep-link, or API query.
|
|
16
22
|
- Resolve org from channel config: `jr-rpc config get sentry.org`
|
|
17
23
|
- Resolve project from channel config: `jr-rpc config get sentry.project` (optional — many queries span multiple projects).
|
|
18
24
|
- If org is missing and needed, ask the user.
|
|
@@ -21,8 +27,10 @@ Use this skill for Sentry investigation workflows in the harness.
|
|
|
21
27
|
|
|
22
28
|
- Use `sentry <command>` for structured queries.
|
|
23
29
|
- The runtime injects `SENTRY_AUTH_TOKEN` automatically for authenticated `sentry` CLI commands in this skill.
|
|
24
|
-
- Read [references/cli-commands.md](references/cli-commands.md)
|
|
30
|
+
- Read [references/cli-commands.md](references/cli-commands.md) when choosing command shapes, target formats, flags, API fallback, or troubleshooting behavior.
|
|
25
31
|
- Read [references/sandbox-runtime.md](references/sandbox-runtime.md) before relying on sandbox credentials.
|
|
32
|
+
- Prefer `--json` when parsing or summarizing results.
|
|
33
|
+
- If no high-level CLI command covers the requested read-only data, use `sentry api <endpoint>` before claiming the workflow is blocked.
|
|
26
34
|
- If a Sentry API call returns `401`, or clearly says the token is invalid, expired, revoked, or unauthorized, rerun the real Sentry command once and let the runtime trigger a reconnect flow when needed.
|
|
27
35
|
- If a Sentry API call explicitly says `missing scope`, `missing scopes`, or `insufficient scope`, rerun the real Sentry command once and let the runtime trigger a reconnect flow when needed.
|
|
28
36
|
- If a Sentry API call returns a generic `403`, `permission denied`, or otherwise indicates missing org/project access without naming missing scopes, stop and tell the user the current Sentry connection could not access the requested Sentry data.
|
|
@@ -41,7 +49,7 @@ Use this skill for Sentry investigation workflows in the harness.
|
|
|
41
49
|
## Guardrails
|
|
42
50
|
|
|
43
51
|
- Read-only operations only (MVP scope).
|
|
44
|
-
- Avoid speculative
|
|
52
|
+
- Avoid speculative Sentry CLI subcommands. Use bundled references plus live `sentry --help` output to verify current commands.
|
|
45
53
|
- Do not print credential values.
|
|
46
54
|
- If org is missing and needed, ask the user.
|
|
47
55
|
- Prefer deep links over raw data dumps when linking to Sentry web UI.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Sentry Skill Sources
|
|
2
|
+
|
|
3
|
+
Last updated: 2026-04-30
|
|
4
|
+
|
|
5
|
+
## Source inventory
|
|
6
|
+
|
|
7
|
+
| Source | Trust tier | Confidence | Contribution | Usage constraints |
|
|
8
|
+
| --------------------------------------------------------------- | ---------- | ---------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
9
|
+
| `https://github.com/getsentry/junior/issues/271` | canonical | high | Regression report: Junior tried stale `sentry organizations list` and should verify current CLI help before blocking. | Use as issue context, not as a full command reference. |
|
|
10
|
+
| `https://cli.sentry.dev/commands/issue/` | canonical | high | Current `sentry issue list`, target syntax, issue subcommands, and JSON support. | Verify live help when runtime CLI differs. |
|
|
11
|
+
| `https://cli.sentry.dev/commands/org/` | canonical | high | Current `sentry org list` and `sentry org view` commands. | Verify live help when runtime CLI differs. |
|
|
12
|
+
| `https://cli.sentry.dev/commands/log/` | canonical | high | Current `sentry log list` and `sentry log view` commands, trace filtering, and log query flags. | Verify live help when runtime CLI differs. |
|
|
13
|
+
| `https://cli.sentry.dev/commands/trace/` | canonical | high | Current `sentry trace list`, `view`, and `logs` commands. | Verify live help when runtime CLI differs. |
|
|
14
|
+
| `https://cli.sentry.dev/commands/api/` | canonical | high | Authenticated `sentry api <endpoint>` fallback and request flags. | Use read-only requests unless the user asks for mutation. |
|
|
15
|
+
| `https://cli.sentry.dev/configuration/` | canonical | high | `SENTRY_AUTH_TOKEN`, JSON/global flags, cache controls, and runtime configuration behavior. | Junior injects credentials; do not persist or print tokens. |
|
|
16
|
+
| `pnpm view sentry version dist-tags description bin repository` | canonical | high | Confirmed npm package `sentry` latest is `0.30.0` and exposes `sentry` binary. | Package metadata only; command behavior still comes from help/docs. |
|
|
17
|
+
| `pnpm dlx sentry@latest --help` and subcommand help | canonical | high | Confirmed executable help lists org list/view, issue list/events/view, log list/view, trace list/view/logs, and api. | Re-run when updating for a newer CLI. |
|
|
18
|
+
| `packages/junior-sentry/plugin.yaml` | canonical | high | Confirms runtime dependency is the npm `sentry` package and auth token env is `SENTRY_AUTH_TOKEN`. | Local repo contract. |
|
|
19
|
+
| `packages/junior/src/chat/sandbox/eval-sentry-stub.ts` | canonical | medium | Eval-only shim needed to avoid preserving stale command forms in tests. | Not a production CLI source. |
|
|
20
|
+
|
|
21
|
+
## Decisions
|
|
22
|
+
|
|
23
|
+
| Decision | Status | Rationale |
|
|
24
|
+
| ---------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------- |
|
|
25
|
+
| Use singular canonical command groups in runtime guidance. | adopted | Current docs and latest executable help use `issue`, `org`, `log`, and `trace`. |
|
|
26
|
+
| Add a live-help verification gate before blocking. | adopted | Issue 271 showed a stale remembered command produced a false blocked answer. |
|
|
27
|
+
| Keep `sentry api <endpoint>` as a read-only fallback. | adopted | Current CLI exposes an authenticated API escape hatch for resources not covered by high-level commands. |
|
|
28
|
+
| Prefer `--json` and optional `--fields` for parsing. | adopted | Current CLI supports machine-readable output across command groups. |
|
|
29
|
+
| Preserve stale plural subcommands as recommended forms. | rejected | `organizations list` was the root failure; aliases should not be taught as canonical command shapes. |
|
|
30
|
+
| Create a broad new troubleshooting reference. | deferred | Current failure modes fit in the focused CLI reference without crowding `SKILL.md`. |
|
|
31
|
+
|
|
32
|
+
## Coverage matrix
|
|
33
|
+
|
|
34
|
+
| Dimension | Coverage status | Evidence |
|
|
35
|
+
| ---------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
36
|
+
| API surface and behavior contracts | complete | `cli-commands.md` covers issue, org, log, trace, and API command shapes plus live help verification. |
|
|
37
|
+
| Config/runtime options | complete | `sandbox-runtime.md`, `plugin.yaml`, and CLI configuration docs cover injected auth and runtime package installation. |
|
|
38
|
+
| Common use cases | complete | `cli-commands.md` maps org listing, issue search/view/events, logs, traces, trace logs, and API fallback. |
|
|
39
|
+
| Known issues/workarounds | complete | `cli-commands.md` troubleshooting covers stale plural commands, target syntax, JSON parsing, cache, auth, scope, and access failures. |
|
|
40
|
+
| Version/migration variance | complete | The skill now treats live CLI help as final when references and installed CLI disagree. |
|
|
41
|
+
|
|
42
|
+
## Open gaps
|
|
43
|
+
|
|
44
|
+
- Review the Sentry CLI docs and rerun `pnpm dlx sentry@latest --help` when the plugin pins or upgrades beyond npm `sentry@0.30.0`.
|
|
45
|
+
|
|
46
|
+
## Changelog
|
|
47
|
+
|
|
48
|
+
- 2026-04-30: Reconciled skill guidance with Sentry CLI `0.30.0`, replaced stale plural command forms, added live-help verification, expanded log/trace/API guidance, updated eval smoke artifacts, and added an org-list command-selection eval.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Sentry Skill Specification
|
|
2
|
+
|
|
3
|
+
## Intent
|
|
4
|
+
|
|
5
|
+
The Sentry skill helps agents investigate live Sentry telemetry through the Sentry CLI using per-user credentials injected by Junior.
|
|
6
|
+
It should produce useful read-only investigation results or Sentry web links without exposing credentials.
|
|
7
|
+
|
|
8
|
+
## Scope
|
|
9
|
+
|
|
10
|
+
In scope:
|
|
11
|
+
|
|
12
|
+
- Listing and viewing Sentry issues, issue events, logs, traces, organizations, and related read-only data.
|
|
13
|
+
- Using `sentry api <endpoint>` for authenticated read-only requests when no high-level command exists.
|
|
14
|
+
- Generating Sentry deep links for user-scoped or entity-specific views.
|
|
15
|
+
- Diagnosing auth, scope, and access failures without guessing missing scopes.
|
|
16
|
+
|
|
17
|
+
Out of scope:
|
|
18
|
+
|
|
19
|
+
- Repository, code search, commit, branch, and pull-request work.
|
|
20
|
+
- Mutating Sentry data unless the user explicitly asks for a write action.
|
|
21
|
+
- Persisting, printing, or transforming Sentry credentials.
|
|
22
|
+
|
|
23
|
+
## Users And Trigger Context
|
|
24
|
+
|
|
25
|
+
- Primary users: Junior users asking Slack or harness agents to investigate Sentry data.
|
|
26
|
+
- Common user requests: "list my Sentry issues", "show error logs", "inspect this trace", "which orgs can I access", "open the issue in Sentry".
|
|
27
|
+
- Should not trigger for: source-code tasks, GitHub PRs, repository searches, or generic questions about Sentry SDK implementation.
|
|
28
|
+
|
|
29
|
+
## Runtime Contract
|
|
30
|
+
|
|
31
|
+
- Required first actions: classify the Sentry operation, resolve configured org/project when needed, and verify current CLI help before blocking on an unknown command.
|
|
32
|
+
- Required outputs: concise findings, relevant Sentry URLs or deep links, and clear access/auth failure messages.
|
|
33
|
+
- Non-negotiable constraints: do not print credentials; prefer read-only commands; use canonical current CLI command groups; use `sentry api` before claiming a read-only surface is unavailable.
|
|
34
|
+
- Expected bundled files loaded at runtime: `references/cli-commands.md`, `references/deep-link-patterns.md`, and `references/sandbox-runtime.md`.
|
|
35
|
+
|
|
36
|
+
## Current CLI Data
|
|
37
|
+
|
|
38
|
+
- Verified date: 2026-04-30.
|
|
39
|
+
- Verified npm package: `sentry@0.30.0`, installed from the plugin `runtime-dependencies` entry.
|
|
40
|
+
- Auth model: Junior injects `SENTRY_AUTH_TOKEN` for authenticated Sentry commands during the requesting user's turn.
|
|
41
|
+
- Canonical command groups: `sentry issue`, `sentry org`, `sentry log`, `sentry trace`, and `sentry api`.
|
|
42
|
+
- Required migration rule: prefer singular command groups such as `sentry org list`; do not teach stale plural command forms such as `sentry organizations list`.
|
|
43
|
+
- Required fallback rule: use `sentry api <endpoint>` for read-only data when no high-level CLI command covers the requested surface.
|
|
44
|
+
|
|
45
|
+
## Source And Evidence Model
|
|
46
|
+
|
|
47
|
+
Authoritative sources:
|
|
48
|
+
|
|
49
|
+
- Current Sentry CLI docs and live `sentry --help` output.
|
|
50
|
+
- The Sentry plugin manifest and Junior runtime contracts.
|
|
51
|
+
- GitHub issues or PRs that document observed skill failures.
|
|
52
|
+
|
|
53
|
+
Useful improvement sources:
|
|
54
|
+
|
|
55
|
+
- positive examples: successful Sentry investigations with exact command choices.
|
|
56
|
+
- negative examples: false blocked answers, stale CLI command forms, or incorrect auth/scope recovery.
|
|
57
|
+
- commit logs/changelogs: Sentry CLI command migrations and Junior plugin runtime changes.
|
|
58
|
+
- issue or PR feedback: reports like issue 271.
|
|
59
|
+
- eval results: targeted Slack/harness evals for command selection and credential injection.
|
|
60
|
+
|
|
61
|
+
Data that must not be stored:
|
|
62
|
+
|
|
63
|
+
- secrets
|
|
64
|
+
- customer data
|
|
65
|
+
- private Sentry URLs or identifiers that are not needed for reproduction
|
|
66
|
+
|
|
67
|
+
## Reference Architecture
|
|
68
|
+
|
|
69
|
+
- `SKILL.md` contains activation, workflow routing, and non-negotiable guardrails.
|
|
70
|
+
- `SOURCES.md` contains provenance, decisions, coverage, gaps, and changelog.
|
|
71
|
+
- `references/cli-commands.md` contains command selection, flags, use cases, and troubleshooting.
|
|
72
|
+
- `references/deep-link-patterns.md` contains URL templates and link-generation rules.
|
|
73
|
+
- `references/sandbox-runtime.md` contains harness runtime and credential injection guidance.
|
|
74
|
+
- `references/evidence/`, `scripts/`, and `assets/` are currently unused.
|
|
75
|
+
|
|
76
|
+
## Evaluation
|
|
77
|
+
|
|
78
|
+
- Lightweight validation: run skill validation and grep for stale command forms after CLI updates.
|
|
79
|
+
- Deeper evaluation: add Slack/harness evals for org listing, issue search, log search, trace lookup, API fallback, and auth recovery.
|
|
80
|
+
- Holdout examples: requests that mention "organizations list", "orgs", "logs for this trace", and "use the API".
|
|
81
|
+
- Acceptance gates: command guidance matches latest CLI help, stale plural forms are not canonical, read-only fallback is available, and credential handling remains private.
|
|
82
|
+
|
|
83
|
+
## Known Limitations
|
|
84
|
+
|
|
85
|
+
- The skill depends on the runtime-installed npm `sentry` package, which may change independently of this repository.
|
|
86
|
+
- The eval shim is intentionally narrow and is not a full Sentry CLI replacement.
|
|
87
|
+
- Some live Sentry requests require org/project context or product access that the current user may not have.
|
|
88
|
+
|
|
89
|
+
## Maintenance Notes
|
|
90
|
+
|
|
91
|
+
- When to update `SKILL.md`: trigger language, workflow order, or global guardrails change.
|
|
92
|
+
- When to update `SOURCES.md`: command surfaces, docs, issue evidence, or runtime dependency behavior changes.
|
|
93
|
+
- When to update `README.md` and this `SPEC.md`: verified Sentry CLI version, canonical command groups, or migration/fallback rules change.
|
|
94
|
+
- When to update `references/cli-commands.md`: any Sentry CLI command, flag, target syntax, or fallback behavior changes.
|
|
95
|
+
- When to update `references/evidence/`: store durable examples of repeated false positives, false blocks, or corrected investigations.
|
|
@@ -1,35 +1,128 @@
|
|
|
1
1
|
# Sentry CLI Command Reference
|
|
2
2
|
|
|
3
|
+
Open this file when selecting a Sentry CLI command, checking target syntax, or diagnosing an unknown-command failure.
|
|
4
|
+
|
|
3
5
|
All commands use `sentry` and read `SENTRY_AUTH_TOKEN` from environment.
|
|
6
|
+
The npm `sentry` package is intentionally installed at runtime from the plugin manifest, so verify live help before blocking on a missing command.
|
|
7
|
+
|
|
8
|
+
## Command selection rules
|
|
9
|
+
|
|
10
|
+
1. Prefer current canonical singular command groups: `issue`, `org`, `log`, `trace`, and `api`.
|
|
11
|
+
2. Do not use stale plural subcommands such as `sentry organizations list`.
|
|
12
|
+
3. If a command errors as unknown, run `sentry --help` and the nearest subcommand help before declaring the surface unavailable.
|
|
13
|
+
4. Prefer `--json` and, when useful, `--fields` for structured parsing.
|
|
14
|
+
5. Use `sentry api <endpoint>` for authenticated read-only API calls when a high-level command does not cover the requested data.
|
|
4
15
|
|
|
5
16
|
## Issue commands
|
|
6
17
|
|
|
7
18
|
### List issues
|
|
8
19
|
|
|
9
20
|
```bash
|
|
10
|
-
sentry
|
|
21
|
+
sentry issue list [ORG/PROJECT|ORG/|PROJECT] [--query QUERY] [--period PERIOD] [--sort SORT] [--limit N] [--json]
|
|
11
22
|
```
|
|
12
23
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
24
|
+
- `ORG/PROJECT`: Explicit organization and project.
|
|
25
|
+
- `ORG/`: All projects in an organization. The trailing slash is significant.
|
|
26
|
+
- `PROJECT`: Search for a project by name across accessible organizations.
|
|
15
27
|
- `--query`: Sentry search query (e.g., `user.email:alice@example.com`, `is:unresolved`).
|
|
28
|
+
- `--period`: Time range such as `24h`, `7d`, or an absolute range.
|
|
29
|
+
- `--sort`: `date`, `new`, `freq`, or `user`.
|
|
30
|
+
- `--limit`: Maximum result count.
|
|
16
31
|
- `--json`: Output as JSON for structured parsing.
|
|
17
32
|
|
|
33
|
+
Use `sentry issue view ISSUE`, `sentry issue events ISSUE`, `sentry issue explain ISSUE`, or `sentry issue plan ISSUE` when the user asks for a specific issue, its events, root cause, or a fix plan.
|
|
34
|
+
|
|
18
35
|
## Organization commands
|
|
19
36
|
|
|
20
37
|
### List organizations
|
|
21
38
|
|
|
22
39
|
```bash
|
|
23
|
-
sentry
|
|
40
|
+
sentry org list [--limit N] [--json]
|
|
24
41
|
```
|
|
25
42
|
|
|
26
43
|
Lists organizations accessible with current token.
|
|
27
44
|
|
|
45
|
+
### View organization
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
sentry org view ORG [--json]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Views one organization.
|
|
52
|
+
|
|
53
|
+
## Log commands
|
|
54
|
+
|
|
55
|
+
### List logs
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
sentry log list [ORG/PROJECT|PROJECT|TRACE_ID|ORG/TRACE_ID] [--query QUERY] [--period PERIOD] [--limit N] [--json]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- `ORG/PROJECT`: Explicit project target.
|
|
62
|
+
- `PROJECT`: Search for a project by name.
|
|
63
|
+
- `TRACE_ID` or `ORG/TRACE_ID`: Filter logs by trace.
|
|
64
|
+
- `--query`: Filter query such as `level:error` or `project:[frontend,backend]`.
|
|
65
|
+
- `--period`: Time range.
|
|
66
|
+
- `--limit`: Maximum result count.
|
|
67
|
+
|
|
68
|
+
Use `sentry log view [ORG/PROJECT] LOG_ID...` after `log list` returns IDs.
|
|
69
|
+
|
|
70
|
+
## Trace commands
|
|
71
|
+
|
|
72
|
+
### List traces
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
sentry trace list [ORG/PROJECT|PROJECT] [--query QUERY] [--period PERIOD] [--sort SORT] [--limit N] [--json]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Use `sentry trace view [ORG/PROJECT/]TRACE_ID` for trace details.
|
|
79
|
+
Use `sentry trace logs [ORG/]TRACE_ID` when the user asks for logs associated with a trace.
|
|
80
|
+
|
|
81
|
+
## API fallback
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
sentry api ENDPOINT [--method METHOD] [--field KEY=VALUE] [--data JSON] [--json]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- `ENDPOINT` is relative to `/api/0/`, for example `organizations/` or `issues/123456789/`.
|
|
88
|
+
- Use read-only `GET` requests by default.
|
|
89
|
+
- Do not use API write methods unless the user explicitly asks for a mutating Sentry action.
|
|
90
|
+
- Use `--dry-run` when verifying a complex endpoint or request body.
|
|
91
|
+
|
|
28
92
|
## Common flags
|
|
29
93
|
|
|
30
94
|
- `--json`: Structured JSON output (preferred for parsing).
|
|
31
|
-
- `--
|
|
32
|
-
- `--
|
|
33
|
-
- `--log-level`: `
|
|
95
|
+
- `--fields`: Comma-separated JSON fields to include.
|
|
96
|
+
- `--fresh`: Bypass local CLI caches and re-detect projects.
|
|
97
|
+
- `--log-level`: `error`, `warn`, `log`, `info`, `debug`, or `trace`.
|
|
98
|
+
|
|
99
|
+
## Common use cases
|
|
100
|
+
|
|
101
|
+
| User request | Command pattern |
|
|
102
|
+
| ----------------------------------------------------- | ------------------------------------------------------------------- |
|
|
103
|
+
| "List my orgs" | `sentry org list --json` |
|
|
104
|
+
| "Show issues in frontend" | `sentry issue list ORG/frontend --json` |
|
|
105
|
+
| "Show unresolved errors across the org" | `sentry issue list ORG/ --query "is:unresolved level:error" --json` |
|
|
106
|
+
| "Inspect this issue" | `sentry issue view ISSUE --json` |
|
|
107
|
+
| "Show events for this issue" | `sentry issue events ISSUE --json` |
|
|
108
|
+
| "Find error logs" | `sentry log list ORG/PROJECT --query "level:error" --json` |
|
|
109
|
+
| "Inspect a trace" | `sentry trace view ORG/PROJECT/TRACE_ID --json` |
|
|
110
|
+
| "Show logs for a trace" | `sentry trace logs ORG/TRACE_ID --json` |
|
|
111
|
+
| "Call an endpoint not covered by high-level commands" | `sentry api organizations/ --json` |
|
|
112
|
+
|
|
113
|
+
## Troubleshooting
|
|
114
|
+
|
|
115
|
+
| Symptom | Likely cause | Remedy |
|
|
116
|
+
| ------------------------------------------------------------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------- |
|
|
117
|
+
| `organizations list` is unavailable | Stale plural command shape | Use `sentry org list`; verify with `sentry org list --help`. |
|
|
118
|
+
| `issues list --org ORG` is unavailable | Stale flag-based command shape | Use `sentry issue list ORG/` for org-wide or `sentry issue list ORG/PROJECT` for one project. |
|
|
119
|
+
| Bare org slug returns project-search behavior | Missing org-wide trailing slash | Use `ORG/` for all projects in an org. |
|
|
120
|
+
| Command group is not remembered | CLI surface may have changed | Run `sentry --help`, then `sentry <group> --help`. |
|
|
121
|
+
| High-level command does not expose the requested read-only resource | CLI command coverage gap | Use `sentry api <endpoint>` with a read-only endpoint. |
|
|
122
|
+
| Result parsing is brittle | Human table output | Add `--json`, and optionally `--fields`. |
|
|
123
|
+
| Results look stale or target detection is wrong | Local CLI cache or auto-detection | Add `--fresh` or pass an explicit `ORG/PROJECT` target. |
|
|
124
|
+
| API returns `401` or invalid/expired/revoked token text | Stale or missing credential | Rerun the real command once so the runtime can trigger reconnect. |
|
|
125
|
+
| API returns explicit missing scope text | OAuth grant lacks a named scope | Rerun the real command once so the runtime can trigger reconnect. |
|
|
126
|
+
| API returns generic `403` or permission denied | Connected account lacks org/project access | Stop and tell the user the current connection cannot access the requested data. |
|
|
34
127
|
|
|
35
|
-
|
|
128
|
+
Use these command shapes during normal skill execution, but treat live CLI help as the final source when this reference and the installed CLI disagree.
|