Skip to content

Rethink where to put debug_id in event Payload #7161

Closed
@lforst

Description

@lforst

There are considerations around whether the location we currently have debug_id under is a good location. It is now located under event.exception.values[].stacktrace.frames[].debug_id. While it is currently not used, there are worries (mainly by @mitsuhiko and @jan-auer) that having a JavaScript-specific field in the stack frame protocol will complicate many things in our code base.

As of now, the better alternative seems to be putting the debug_id mappings inside the Debug Meta Interface. Here we would have an image type that maps from abs_path (of the JS source file) to debug_id (an identifier for the source map in the backend). Develop PR for more context.

There is a potential issue we may face down the line:

There is a good chance that the filename of a stack frame and the source_filename value of the Debug Meta mapping will not match, especially since we provide a dedicated API with the RewriteFrames integration to manipulate the file path in order to match source maps in the cases where the path may be dynamic. Essentially this means using the new debug_id approach alongside the RewriteFrames integration will in many cases not work.

The alternative solution is to keep the debug_id inside the stack frame object, completely disassociating the filename from source map resolving.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions