You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(code-mappings): Add support for stacktrace frames with backslashes for automatic code mappings (#68845)
This PR updates the existing code mapping logic to support stack traces
whose filepaths contained backslashes instead of forward slashes. This
effectively adds automatic code mapping support for issues derived from
Windows machines (for the existing supported languages).
I've made the choice to save stack roots in the code mappings using
whichever slash delimiter that the original stack path used. For
example, if we have the following stack path and source:
* Stack Path = `"D:\Users\code\sentry\models\release.py"`
* Source path = `"src/sentry/models/release.py"`
Then the roots generated will be:
* Stack Root = `"D:\Users\code\"` (note that this source root still uses
backslashes instead of forward slashes)
* Source Root = `"src/"`
This should be less confusing to the end user since we explicitly say we
are going to replace the `stack_root` in the `stack_path` with the
`source_root` to get the `source_path`. It might be confusing if the
`stack_root`'s slash-delimiter was not the same as that in the
`stack_path`.
This also means that the previous logic to apply code mappings to a
given frame to generate a stacktrace link needed to be updated so that
the source path generated would only include slashes (since this path is
used in a github URL, which only uses forward slashes).
0 commit comments