Skip to content

Conversation

@kashishhora
Copy link
Member

Summary

Added

  • platform field to ErrorData type (set to "javascript")
  • context_line field to StackFrame type for capturing source code lines
  • addContextToFrame function to extract code context from source files
  • Comprehensive tests for context line extraction and platform field
  • Protocol validation error tests

Modified

  • captureException now sets platform: "javascript" on all error data
  • Stack trace parsing now extracts context lines for user code (in_app: true)
  • Context extraction only runs for application code to optimize performance

Test Plan

  • Verify platform field is set to "javascript" on all captured errors
  • Verify context_line is captured for user code frames
  • Verify context_line is NOT captured for library/node_modules frames
  • Verify graceful handling when source files cannot be read
  • Run test suite to confirm all new tests pass

@kashishhora kashishhora requested a review from naji247 November 19, 2025 18:59
@kashishhora kashishhora merged commit 98729f8 into main Nov 19, 2025
8 checks passed
@kashishhora kashishhora deleted the fix/error-tracking-enhancements branch November 20, 2025 13:08
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