Skip to content

Conversation

@kashishhora
Copy link
Member

@kashishhora kashishhora commented Nov 18, 2025

Summary

Added

  • New captureException() function that parses V8 stack traces into structured data
  • Stack frame parsing with file paths, line numbers, function names, and in_app detection
  • Error cause chain unwrapping (Error.cause support)
  • Path normalization for consistent error grouping across deployments
  • New ErrorData, StackFrame, and CauseData types for structured error tracking
  • Comprehensive test suite for exception capture and stack trace parsing

Modified

  • Replaced getMCPCompatibleErrorMessage() with captureException() across all tracing modules
  • Updated error handling in tracing.ts, tracingV2.ts, and internal.ts to use structured error data
  • Simplified error message extraction in Sentry exporter
  • Updated Event.error type from object to ErrorData for type safety

Test Plan

  • Run the test suite (npm test) to verify all exception capture tests pass
  • Test error tracking with various error types (Error, TypeError, ReferenceError, custom errors)
  • Verify stack traces are properly parsed and normalized across different environments
  • Confirm error cause chains are correctly unwrapped
  • Check that in_app detection properly identifies user code vs library code

@kashishhora kashishhora requested a review from naji247 November 18, 2025 11:33
@kashishhora kashishhora requested a review from naji247 November 19, 2025 16:51
@kashishhora kashishhora merged commit 83e0339 into main Nov 19, 2025
8 checks passed
@kashishhora kashishhora deleted the feat/structured-error-tracking branch November 19, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants