Commit a0cbbf9
authored
fix(telemetry): enable sourcemap resolution in Sentry (#144)
## Summary
Sourcemaps were being uploaded to Sentry but stack traces still showed
minified code (e.g., `t.with`, `br`, `bin.cjs:486:1136`).
**Root cause**: The `beforeSend` path normalization was modifying stack
frame filenames (replacing `/home/user` with `~`), which broke Sentry's
ability to match frames against the uploaded sourcemaps via debug IDs.
## Changes
- Remove path normalization in `beforeSend` that broke sourcemap
matching
- Replace `@sentry/esbuild-plugin` with `sentry-cli` commands for more
reliable debug ID injection
- Keep default SDK integrations (filtering instead of disabling all) to
preserve debug ID support
## Before
```
at t.with (~/.../dist/bin.cjs:28:108124)
at br (~/.../dist/bin.cjs:40:4319)
at <unknown> (~/.../dist/bin.cjs:486:1136)
```
## After
```
../src/bin.ts:14:13 (callback)
throw new Error("Sourcemap test error from bin.ts");
../src/lib/telemetry.ts:79:24 (callback)
return await callback(span);
```1 parent 5ab5ef8 commit a0cbbf9
1 file changed
Lines changed: 20 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
116 | 127 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
121 | 134 | | |
122 | 135 | | |
123 | 136 | | |
| |||
133 | 146 | | |
134 | 147 | | |
135 | 148 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 156 | + | |
| 157 | + | |
159 | 158 | | |
160 | 159 | | |
161 | | - | |
162 | | - | |
| 160 | + | |
163 | 161 | | |
164 | 162 | | |
165 | 163 | | |
| |||
0 commit comments