Skip to content

Conversation

@kashishhora
Copy link
Member

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 force-pushed the feat/structured-error-tracking branch from 7ccffc4 to 5e36d5f Compare November 18, 2025 11:29
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.

2 participants