getsentry / sentry-capacitor

The official Sentry SDK for Capacitor
https://sentry.io
MIT License
119 stars 32 forks source link

Known Bug: Stack frames are incorrectly marked with in_app #43

Closed jennmueng closed 2 years ago

jennmueng commented 3 years ago
Screen Shot 2021-06-02 at 11 44 05 PM

In the image above, the typescript file is marked in_app: false, while the JS file is marked in_app: true. It should be the other way around.

lucas-zimerman commented 2 years ago

image It isn't quite clear the usage of in_app for Type/JavaScript code, for now all I found was the following mention:

https://github.com/getsentry/sentry-javascript/commit/858c2f7ac627211f8803eb2c6e03418ac3ce610e#diff-6872f62e614276844d459602f9ddbc095baae448ca27e35fcd0d053ea85e97ebR11-R12

My current sugestion for this fix: consider all browser frames as in_app as long as they don't come from vendor.*.js and polyfills.*.js.

What do you think @bruno-garcia and @marandaneto?

marandaneto commented 2 years ago

@AbhiPrasad or @lobsterkatie might help here, I don't know the inApp logic for JS that well.

timfish commented 2 years ago

I recently re-worked all the stack parsing code so I can confirm that all browser frames are considered in_app.

The capacitor SDK does rewrite frames and override this though: https://github.com/getsentry/sentry-capacitor/blob/9e38a41dc55a40bb4a848744a904bd00af595509/src/sdk.ts#L57-L69

lucas-zimerman commented 2 years ago

Closing this since the expected behavior was implemented.