sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

Improve `in_app` detection

Open sentrivana opened this issue 4 months ago • 1 comments

When viewing a stacktrace in Sentry, frames are marked as either in_app or not in_app. Non-in-app frames are collapsed by default. The original in_app decision comes from the SDK; however, at the moment Sentry can't rely on the in_app decision from the SDK and has rules for overriding it.

Two things we can do about this:

  1. On the Sentry side, remove the redundant checks that set a frame as not in-app if the package is in site-packages or dist-packages. We already check this on the SDK side. Having this rule on the server side means that it sometimes overrides a higher prio decision (e.g., the user explicitly set their in_app_include to include the module). Tracked in https://github.com/getsentry/sentry/issues/79482
  2. On the SDK side, look into frames with unexpected in_app values and fix the underlying issues. (Tracked by this issue.)

Supersedes https://github.com/getsentry/sentry-python/issues/3671

sentrivana avatar Oct 22 '24 12:10 sentrivana