Commit 50373a7
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 50373a7
1 file changed
+65
-15
lines changed| 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