Skip to content

💡Add error.file property on RumErrorEvent to identify the source file of errors #4054

@kazukitaninaka

Description

@kazukitaninaka

Description

I would like to propose adding a file property to the error object in RumErrorEvent. This property would contain the URL of the file where the error originated, extracted from the first frame of the stack trace.

Use Case

When analyzing errors in Datadog RUM, it's often important to distinguish between:

  • First-party errors: Errors originating from our own application code
  • Third-party errors: Errors from external scripts (analytics, ads, browser extensions, etc.)

Currently, to determine the error source, users must:

  • Parse the error.stack string manually
  • Extract the URL from the first stack frame
  • Implement custom filtering logic in beforeSend

Having a dedicated error.file field would provide a simple way to filter out third party errors that you might not want to investigate

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions