-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(code-mappings): Add support for stacktrace frames with backslash…
…es 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).
- Loading branch information
1 parent
380b086
commit 4ed24e4
Showing
3 changed files
with
106 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters