Commit 7063ac9
committed
fix(telemetry): instrument delta upgrade with spans and error capture
Delta upgrade failures were completely invisible in Sentry:
- No spans for the delta attempt (only DB queries visible in traces)
- Errors caught and logged at debug level (invisible without --verbose)
- No captureException — errors never reported to Sentry
This made it impossible to diagnose the ETXTBSY/SIGKILL issues
(PRs #339, #340, #343) from telemetry alone — they were found
through code analysis and local reproduction.
Changes:
- Wrap attemptDeltaUpgrade in withTracingSpan for a 'upgrade.delta' span
- Record delta.from_version, delta.to_version, delta.channel as attributes
- On success: record patch_bytes and sha256 prefix
- On unavailable (no patch): record delta.result='unavailable'
- On error: captureException with warning level + delta context tags,
record delta.result='error' and delta.error message on span
- Upgrade log.debug to log.warn for failure messages so users see them
Now delta failures will appear as:
1. A span in the upgrade trace (with error status + attributes)
2. A warning-level exception in Sentry Issues (with delta context)
3. A visible stderr message to the user1 parent 946ecd3 commit 7063ac9
2 files changed
+134
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
230 | 263 | | |
231 | 264 | | |
232 | 265 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
236 | 270 | | |
237 | 271 | | |
238 | | - | |
239 | | - | |
| 272 | + | |
| 273 | + | |
240 | 274 | | |
241 | 275 | | |
242 | 276 | | |
243 | 277 | | |
244 | 278 | | |
245 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
246 | 305 | | |
247 | 306 | | |
248 | 307 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
| 308 | + | |
254 | 309 | | |
255 | 310 | | |
256 | 311 | | |
257 | | - | |
| 312 | + | |
258 | 313 | | |
259 | 314 | | |
260 | 315 | | |
| |||
263 | 318 | | |
264 | 319 | | |
265 | 320 | | |
266 | | - | |
| 321 | + | |
267 | 322 | | |
268 | 323 | | |
269 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
563 | 566 | | |
564 | 567 | | |
565 | 568 | | |
566 | | - | |
| 569 | + | |
567 | 570 | | |
568 | 571 | | |
569 | 572 | | |
570 | 573 | | |
571 | 574 | | |
572 | | - | |
| 575 | + | |
573 | 576 | | |
574 | 577 | | |
575 | | - | |
| 578 | + | |
576 | 579 | | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
589 | 639 | | |
590 | 640 | | |
591 | 641 | | |
| |||
0 commit comments