Commit 0108c1e
## Summary
Three independent bug fixes discovered from Sentry telemetry data, each
in a separate commit.
---
### 1. fix(span-view): detect bare span ID and show helpful ContextError
(CLI-SC)
**Sentry Issue:** [CLI-SC](https://sentry.sentry.io/issues/CLI-SC) — 7
users, 12 events
**Root cause:** When a user runs `sentry span view <span-id>` with only
a 16-char span ID, the code falls through to `validateTraceId()` which
throws a confusing "Invalid trace ID" error.
**Reproduction:** `sentry span view c38bb3754a4ac6d8`
**Fix:** Added early detection in `parsePositionalArgs()` for a single
bare arg matching span ID format (16-char hex). Throws a targeted
`ContextError` with actionable suggestions instead of the misleading
`ValidationError`.
---
### 2. fix(routing): add 'events' plural alias for 'event' route
(CLI-QZ)
**Sentry Issue:** [CLI-QZ](https://sentry.sentry.io/issues/CLI-QZ) — 47
users, 113 events
**Root cause:** Users typing `sentry events list <issue-id>` get an
unhelpful `OutputError` because `events` isn't a registered route. Every
other resource noun has a plural alias (`issues`, `projects`, `teams`,
etc.) but `events` was missing.
**Reproduction:** `sentry events list FULLPHYSIO-WEB-3C`
**Fix:** Added `events` as a route alias for `eventRoute` (like
`sourcemaps` → `sourcemapRoute`) and added `events: "event"` to
`PLURAL_TO_SINGULAR` so the plural hint system suggests the correct
singular form.
---
### 3. fix(platforms): match middle components in platform suggestions
(CLI-WD)
**Sentry Issue:** [CLI-WD](https://sentry.sentry.io/issues/CLI-WD) — 2
users, 2 events
**Root cause:** When a user types `javascript-cloudflare`, the
suggestion system fails to suggest `node-cloudflare-workers` and
`node-cloudflare-pages` because `cloudflare` appears as a middle
component between dashes, not as a prefix or suffix.
**Reproduction:** `sentry project create <name> javascript-cloudflare`
**Fix:** Added middle-component matching in `findSwapMatches()` so that
components appearing between dashes in valid platform names are also
found.
<div><a
href="https://cursor.com/agents/bc-03af229b-5278-4c3c-acd4-8be47d1b4288"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/automations/95624600-485e-4461-829e-6b76f086c473"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a> </div>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Co-authored-by: Burak Yigit Kaya <byk@sentry.io>
1 parent bda701b commit 0108c1e
File tree
5 files changed
+55
-2
lines changed- src
- commands/span
- lib
- test
- commands/span
- lib
5 files changed
+55
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
247 | | - | |
| 250 | + | |
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
| |||
305 | 308 | | |
306 | 309 | | |
307 | 310 | | |
308 | | - | |
| 311 | + | |
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
133 | 147 | | |
134 | 148 | | |
135 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
| 218 | + | |
| 219 | + | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
225 | 251 | | |
226 | 252 | | |
227 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
0 commit comments