Commit f554eb2
authored
fix: telemetry hardening — nil guard, bounded queue, logger-to-Sentry wiring, source maps (#2477)
* docs: add telemetry hardening design spec (#41-#45)
Design for five telemetry issues: CaptureError nil guard, bounded
deferredMessages, FormData Blob validation, logger-to-Sentry wiring,
and CI source map uploads. Grouped into three independent PRs.
* docs: add telemetry hardening implementation plan
9-task plan across 3 PRs: backend telemetry hardening (nil guard,
bounded deferred queue), frontend telemetry wiring (Blob validation,
logger-to-Sentry injection), and CI source map uploads.
* fix: add nil guard to CaptureError to prevent panic
* fix: cap deferred message queue at 100 to prevent unbounded growth
* fix: drain deferred message queue when Sentry is disabled
* fix: remove incorrect t.Parallel from global-state-mutating test
TestCaptureError_NilError calls EnableTestMode/DisableTestMode which
mutate package-level atomics. Tests mutating global state must not
use t.Parallel per project testing guidelines.
* fix: count Blob size in FormData validation
* feat: add captureError function to frontend Sentry module
* feat: wire logger.error() to Sentry via dependency injection
* fix: align frontend Sentry release format with backend
* feat: enable hidden source map generation for Sentry
* ci: add source map upload to Sentry in release and nightly builds
* fix: clear stale Sentry logger hook on re-init and failed init
Clear setSentryCaptureError(null) before Sentry init and in the
.catch handler to prevent stale forwarding after opt-out or failure.
Add clarifying comment on args.length > 2 threshold in error() method.
---------
Co-authored-by: tphakala <tphakala@users.noreply.github.com>1 parent fdd23fd commit f554eb2
File tree
13 files changed
+1456
-28
lines changed- .github/workflows
- docs/superpowers
- plans
- specs
- frontend
- src/lib
- stores
- telemetry
- utils
- internal/telemetry
13 files changed
+1456
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
84 | 96 | | |
85 | 97 | | |
86 | 98 | | |
87 | 99 | | |
88 | | - | |
| 100 | + | |
89 | 101 | | |
90 | 102 | | |
91 | 103 | | |
92 | 104 | | |
93 | 105 | | |
94 | | - | |
| 106 | + | |
95 | 107 | | |
96 | 108 | | |
97 | | - | |
| 109 | + | |
98 | 110 | | |
99 | 111 | | |
100 | 112 | | |
| |||
107 | 119 | | |
108 | 120 | | |
109 | 121 | | |
110 | | - | |
| 122 | + | |
111 | 123 | | |
112 | 124 | | |
113 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
69 | 87 | | |
70 | 88 | | |
71 | 89 | | |
| |||
0 commit comments