Skip to content

fix(grouping): Match Dart bootstrap stub frames by trimmed function name#117161

Merged
buenaflor merged 1 commit into
masterfrom
buenaflor/fix/dart-bootstrap-stub-function-match
Jun 10, 2026
Merged

fix(grouping): Match Dart bootstrap stub frames by trimmed function name#117161
buenaflor merged 1 commit into
masterfrom
buenaflor/fix/dart-bootstrap-stub-function-match

Conversation

@buenaflor

Copy link
Copy Markdown
Contributor

Dart VM bootstrap frames (InvokeDartCode, CallBootstrapNative) are now reliably marked out-of-app on the native platform.

On real symbolicated native frames the symbolicator keeps the stub prefix in raw_function/symbol while function already holds the trimmed name (e.g. InvokeDartCode). Since raw_function is set, the grouping matcher uses function unchanged, so the previous function:"stub ..." rules never matched a production frame.

Rule change

The two rules now match the trimmed function value:

- family:native function:"stub InvokeDartCode" -app
- family:native function:"stub CallBootstrapNative" -app
+ family:native function:"InvokeDartCode" -app
+ family:native function:"CallBootstrapNative" -app

This is also robust when raw_function is absent: trim_native_function_name("stub InvokeDartCode") collapses to InvokeDartCode, so the rule still fires.

The regression test was updated to use the real frame shape (trimmed function plus stub ... in raw_function/symbol) instead of the previous artificial frame that put stub ... directly in function.

Made with Cursor

Real symbolicated native frames keep the `stub ` prefix in
`raw_function`/`symbol` while `function` holds the trimmed name (e.g.
`InvokeDartCode`). Because `raw_function` is set, the grouping matcher uses
`function` unchanged, so the rules must match the trimmed name rather than the
`stub ...` form, which never occurs in `function` for production frames.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 9, 2026
@buenaflor buenaflor marked this pull request as ready for review June 9, 2026 09:17
@buenaflor buenaflor requested a review from a team as a code owner June 9, 2026 09:17
Copilot AI review requested due to automatic review settings June 9, 2026 09:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes native grouping enhancement rules for Dart VM bootstrap stub frames so they correctly match production-symbolicated frame shapes and are consistently marked out-of-app on the native platform.

Changes:

  • Update the native enhancement rules to match trimmed Dart VM bootstrap function values (InvokeDartCode, CallBootstrapNative) instead of the stub ... raw symbol form.
  • Update the regression test to reflect real symbolicated frames where function is trimmed while raw_function/symbol retain the stub prefix.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/sentry/grouping/test_enhancer_dart_flutter_native.py Adjusts the test frame shape to match real symbolicated native frames (trimmed function, stub ... in raw_function/symbol).
src/sentry/grouping/enhancer/enhancement-configs/all-platforms@2026-01-20.txt Updates Dart VM bootstrap stub matching rules to target the trimmed function name so they match when raw_function is present.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@buenaflor buenaflor requested a review from armenzg June 10, 2026 13:38
@buenaflor buenaflor merged commit ddb8a3f into master Jun 10, 2026
63 checks passed
@buenaflor buenaflor deleted the buenaflor/fix/dart-bootstrap-stub-function-match branch June 10, 2026 14:40
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.

3 participants