feat(studio): add stack traces to all error telemetry events

Send `stack_trace` (up to 4KB) on crash, unhandled_error, and
unhandled_promise_rejection events so PostHog captures the full JS
call stack for debugging. Also bump `component_stack` from 500→2000
chars, and add `error_name` to promise rejections.
This commit is contained in:
Miguel Ángel
2026-05-21 12:18:55 -04:00
parent 114b83bbf6
commit 6a868b3787
2 changed files with 22 additions and 7 deletions
@@ -21,7 +21,8 @@ export class StudioErrorBoundary extends Component<Props, State> {
trackStudioEvent("crash", {
error_message: error.message,
error_name: error.name,
component_stack: info.componentStack?.slice(0, 500) ?? null,
stack_trace: error.stack?.slice(0, 4000) ?? null,
component_stack: info.componentStack?.slice(0, 2000) ?? null,
});
}