-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve in_app
detection
#3682
Comments
Example:
{
"exception": {
"values": [
{
"stacktrace": {
"frames": [
{
"abs_path": "/app/<frozen runpy>",
"in_app": true # why?
},
{
"abs_path": "/app/.heroku/python/lib/python3.11/site-packages/mypackage/__main__.py",
"in_app": false # why?
},
{
"abs_path": "/app/.heroku/python/lib/python3.11/site-packages/click/core.py",
"in_app": false
},
{
"abs_path": "/app/.heroku/python/lib/python3.11/site-packages/click/decorators.py",
"in_app": false
},
{
"abs_path": "/app/.heroku/python/lib/python3.11/site-packages/mypackage/__main__.py",
"in_app": false # why?
},
{
"abs_path": "/app/.heroku/python/lib/python3.11/site-packages/mypackage/dir/some_python_file.py",
"in_app": false,
"data": {
"orig_in_app": 1
}
},
{
"abs_path": "/app/.heroku/python/lib/python3.11/site-packages/mypackage/another_dir/another_python_file.py",
"in_app": false,
"data": {
"orig_in_app": 1
}
}
]
}
}
]
}
} |
Left a comment on #3671, but TL;DR I think this logic should live server-side (which doesn't mean that if we're making wrong decisions there we shouldn't perform this same investigation, of course!). Meta: Right now, we're having this conversation in four places: here, in getsentry/sentry#79482, in #3671, and in #3672. Can we centralize to one spot as we continue to discuss this? (And/or just hop on a call with you, me, @armenzg , and anyone else who's interested, and just hash it out?) |
Hopefully this will work as expected at some point, see getsentry/sentry-python#3682
When viewing a stacktrace in Sentry, frames are marked as either
in_app
or notin_app
. Non-in-app frames are collapsed by default. The originalin_app
decision comes from the SDK; however, at the moment Sentry can't rely on thein_app
decision from the SDK and has rules for overriding it.Two things we can do about this:
site-packages
ordist-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 theirin_app_include
to include the module). Tracked in Tweakin_app
rules for events from Python SDK sentry#79482in_app
values and fix the underlying issues. (Tracked by this issue.)Supersedes #3671
The text was updated successfully, but these errors were encountered: