Commit 86fc7aa
authored
fix: correctly forward error payload to launchdarkly (#285)
## Summary
Ensure that the SDK correctly reports the error payload to LaunchDarkly.
## How did you test this change?
<img width="2209" height="1922" alt="image"
src="https://github.com/user-attachments/assets/cb6977b3-b891-4f9a-a505-ed865d0338ec"
/>
## Are there any deployment considerations?
no
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Parses/merges error payload into span attributes and forwards it to
LaunchDarkly error events; sets default error source to "frontend".
>
> - **Observe SDK (`sdk/observe.ts`)**:
> - Merge JSON from `errorMsg.payload` into error span attributes and
forward integrations a stringified `payload`.
> - Set default error `source` to `"frontend"` in `recordError`.
> - **LaunchDarkly Integration (`integrations/launchdarkly/index.ts`)**:
> - Parse `error.payload` and include its fields in `LD_ERROR_EVENT`
tracking payload.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e33ef4f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent afcc5c5 commit 86fc7aa
File tree
2 files changed
+23
-3
lines changed- sdk/highlight-run/src
- integrations/launchdarkly
- sdk
2 files changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
249 | 256 | | |
250 | | - | |
| 257 | + | |
251 | 258 | | |
| 259 | + | |
252 | 260 | | |
253 | 261 | | |
254 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
224 | 232 | | |
225 | 233 | | |
226 | 234 | | |
| |||
237 | 245 | | |
238 | 246 | | |
239 | 247 | | |
| 248 | + | |
240 | 249 | | |
241 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
242 | 254 | | |
243 | 255 | | |
244 | 256 | | |
| |||
266 | 278 | | |
267 | 279 | | |
268 | 280 | | |
269 | | - | |
| 281 | + | |
270 | 282 | | |
271 | 283 | | |
272 | 284 | | |
| |||
0 commit comments