Skip to content
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

feat(grouping): Use project_root for in-app logic #84156

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lobsterkatie
Copy link
Member

In the python SDK, we automatically mark frames whose filepath matches the project root as being in-app. As we are now moving to a world where all auto-in-app detection happens on the server, we need to replicate that logic in sentry.

The first step in this change is handled in getsentry/sentry-python#3941, which sends the project_root value used in the current SDK logic to the server in debug_meta. This is the second step: using that value on the server to set frames' in-app values. Once this is live, we can remove the corresponding logic from the SDK.

Because we apply the server-side in_app logic in two different places for a total of three times per event (once to set in-app values, and once each for the app and system variants to get hints), the easiest way to incorporate the new logic was to bundle it in with our other built-in stacktrace rules. That way, it gets applied all three times the others do.

We don't currently have the ability to include variables in stacktrace rules the way we do in fingerprint rules, so this is done by manually constructing the rule text and merging it into the already-loaded config before any stacktrace rules are applied. It's not gated by platform, but since for now the Python SDK is the only one sending debug_meta.project_root, it's effectively restricted to Python events.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant