(event: Event, stackParser: StackParser)
| 160 | * Puts debug IDs into the stack frames of an error event. |
| 161 | */ |
| 162 | export function applyDebugIds(event: Event, stackParser: StackParser): void { |
| 163 | // Build a map of filename -> debug_id |
| 164 | const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser); |
| 165 | |
| 166 | event.exception?.values?.forEach(exception => { |
| 167 | exception.stacktrace?.frames?.forEach(frame => { |
| 168 | if (frame.filename) { |
| 169 | frame.debug_id = filenameDebugIdMap[frame.filename]; |
| 170 | } |
| 171 | }); |
| 172 | }); |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * Moves debug IDs from the stack frames of an error event into the debug_meta field. |
no test coverage detected