Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(js): Recognize more abs_paths as in-app (#1505)
The original logic for deciding whether a JS frame should be in-app (seen at https://github.com/getsentry/sentry/blob/69ee8d0fcbff3494f2d2a6fb9fb59195fc49b575/src/sentry/lang/javascript/processor.py#L1573-L1603) is quite convoluted and difficult to understand. The `is_in_app` function reproduces it faithfully, but with some refactoring. In any case, for webpack, only file names beginning with `./` would be considered as in-app, but judging from examples that's too strict. Therefore we change the logic for webpack as follows: A file name is considered _not_ in-app if either of these is true: * It starts with `~/` (according to the documentation in the original Python version, this means it's "coming from node_modules"). * It contains `/node_modules/` as a substring. Otherwise it's considered in-app.
- Loading branch information