Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
df30e6f
refactor: extract span utilities into trace formatter
betegon Mar 11, 2026
5f56b3b
feat: add sentry span list and span view commands
betegon Mar 11, 2026
ae185f6
chore: regenerate SKILL.md
github-actions[bot] Mar 11, 2026
8942c73
refactor: remove UUID warning from span/trace commands
betegon Mar 11, 2026
1b490b1
Merge branch 'main' into feat/span-commands
betegon Mar 11, 2026
9b1cfd6
fix: correct duration filter semantics and span view JSON shape
betegon Mar 11, 2026
1111a40
feat: switch span list to EAP spans endpoint and show span IDs in tra…
betegon Mar 12, 2026
e72074a
merge: resolve conflicts from main into feat/span-commands
betegon Mar 13, 2026
91424c0
chore: regenerate SKILL.md
github-actions[bot] Mar 13, 2026
7bc947c
refactor: migrate span commands to output config + fix markdown rende…
BYK Mar 16, 2026
70895de
Merge remote-tracking branch 'origin/main' into pr-393
BYK Mar 16, 2026
e6727e1
fix: adapt span commands to yield-based output system from main
BYK Mar 16, 2026
f7198cc
fix: address review feedback from Cursor BugBot
BYK Mar 16, 2026
995573a
fix(test): exclude punycode slugs from URL parser property tests
BYK Mar 16, 2026
051830a
fix: address second round of BugBot feedback
BYK Mar 16, 2026
753acc4
fix: null-safe span_id comparison in findSpanById
BYK Mar 16, 2026
e2c9215
refactor(span/view): use positional trace ID + add tests + fix SKILL.md
BYK Mar 16, 2026
c3500fa
fix: update span view hint to use new positional syntax
BYK Mar 16, 2026
f68d1e6
fix(docs): remove unsupported project-search format from span view
BYK Mar 16, 2026
f3b6fe3
refactor: address human reviewer feedback on span commands
BYK Mar 16, 2026
1230ccb
chore: regenerate SKILL.md
github-actions[bot] Mar 16, 2026
af9e278
refactor: unify sort values with trace list ('date'/'duration')
BYK Mar 16, 2026
817eb16
chore: regenerate SKILL.md
github-actions[bot] Mar 16, 2026
22fc1b2
refactor: address second round of human review feedback
BYK Mar 16, 2026
9a5cb9a
chore: regenerate SKILL.md
github-actions[bot] Mar 16, 2026
94014e7
refactor: break circular import between human.ts and trace.ts
BYK Mar 16, 2026
1794244
feat(span/list): add cursor pagination support
BYK Mar 16, 2026
87664f1
fix: merge duplicate time-utils imports in human.ts
BYK Mar 16, 2026
e47b254
fix: handle negated query keys + remove unused FlatSpan fields
BYK Mar 16, 2026
72a9686
docs: update AGENTS.md with patterns from span commands work
BYK Mar 16, 2026
4da7ff4
revert: remove AGENTS.md changes (moved to PR #433)
BYK Mar 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 50 additions & 20 deletions AGENTS.md

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions plugins/sentry-cli/skills/sentry-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,33 @@ sentry log view my-org/backend 968c763c740cfda8b6728f27fb9e9b01
sentry log list --json | jq '.[] | select(.level == "error")'
```

### Span

View spans in distributed traces

#### `sentry span list <org/project/trace-id...>`

List spans in a trace

**Flags:**
- `-n, --limit <value> - Number of spans (<=1000) - (default: "25")`
- `-q, --query <value> - Filter spans (e.g., "op:db", "duration:>100ms", "project:backend")`
- `-s, --sort <value> - Sort order: date, duration - (default: "date")`
- `-c, --cursor <value> - Pagination cursor (use "last" to continue from previous page)`
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`
- `--json - Output as JSON`
- `--fields <value> - Comma-separated fields to include in JSON output (dot.notation supported)`

#### `sentry span view <trace-id/span-id...>`

View details of specific spans

**Flags:**
- `--spans <value> - Span tree depth limit (number, "all" for unlimited, "no" to disable) - (default: "3")`
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`
- `--json - Output as JSON`
- `--fields <value> - Comma-separated fields to include in JSON output (dot.notation supported)`

### Trace

View distributed traces
Expand Down Expand Up @@ -806,6 +833,23 @@ List logs from a project
- `--json - Output as JSON`
- `--fields <value> - Comma-separated fields to include in JSON output (dot.notation supported)`

### Spans

List spans in a trace

#### `sentry spans <org/project/trace-id...>`

List spans in a trace

**Flags:**
- `-n, --limit <value> - Number of spans (<=1000) - (default: "25")`
- `-q, --query <value> - Filter spans (e.g., "op:db", "duration:>100ms", "project:backend")`
- `-s, --sort <value> - Sort order: date, duration - (default: "date")`
- `-c, --cursor <value> - Pagination cursor (use "last" to continue from previous page)`
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`
- `--json - Output as JSON`
- `--fields <value> - Comma-separated fields to include in JSON output (dot.notation supported)`

### Traces

List recent traces in a project
Expand Down
5 changes: 5 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { projectRoute } from "./commands/project/index.js";
import { listCommand as projectListCommand } from "./commands/project/list.js";
import { repoRoute } from "./commands/repo/index.js";
import { listCommand as repoListCommand } from "./commands/repo/list.js";
import { spanRoute } from "./commands/span/index.js";
import { listCommand as spanListCommand } from "./commands/span/list.js";
import { teamRoute } from "./commands/team/index.js";
import { listCommand as teamListCommand } from "./commands/team/list.js";
import { traceRoute } from "./commands/trace/index.js";
Expand All @@ -50,6 +52,7 @@ const PLURAL_TO_SINGULAR: Record<string, string> = {
repos: "repo",
teams: "team",
logs: "log",
spans: "span",
traces: "trace",
trials: "trial",
};
Expand All @@ -67,6 +70,7 @@ export const routes = buildRouteMap({
issue: issueRoute,
event: eventRoute,
log: logRoute,
span: spanRoute,
trace: traceRoute,
trial: trialRoute,
init: initCommand,
Expand All @@ -77,6 +81,7 @@ export const routes = buildRouteMap({
repos: repoListCommand,
teams: teamListCommand,
logs: logListCommand,
spans: spanListCommand,
traces: traceListCommand,
trials: trialListCommand,
whoami: whoamiCommand,
Expand Down
24 changes: 24 additions & 0 deletions src/commands/span/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* sentry span
*
* View and explore individual spans within distributed traces.
*/

import { buildRouteMap } from "@stricli/core";
import { listCommand } from "./list.js";
import { viewCommand } from "./view.js";

export const spanRoute = buildRouteMap({
routes: {
list: listCommand,
view: viewCommand,
},
docs: {
brief: "View spans in distributed traces",
fullDescription:
"View and explore individual spans within distributed traces.\n\n" +
"Commands:\n" +
" list List spans in a trace\n" +
" view View details of specific spans",
},
});
Loading
Loading