feat(proguard): Support outline and outlineCallsite annotations#1817
Merged
feat(proguard): Support outline and outlineCallsite annotations#1817
Conversation
Sentry orders stacktraces from outermost frame to innermost. Symbolicator does it the other way around, from innermost to outermost. For native events, we reverse stacktraces in Sentry before sending them to Symbolicator and then reverse the result again. This means that Symbolicator can just assume the order it wants and never has to reverse anything. I neglected to take this into account when porting proguard processing to Symbolicator, so Sentry sends JVM stacktraces in thge order it wants. Instead, we previously reversed the output of the `map_full_frame` function, which achieved the same result. This PR attempts to clean up the situation by moving the reversing logic as far outward as possible. JVM stacktraces are now reversed (from "Sentry order" to "Symbolicator order" in the `symbolicate-jvm`) endpoint and reversed again when the response is returned. This means that in the "interior" of Symbolicator the order is always the same. The PR also changes a number of tests: it introduces snapshots for some that were previously asserting stuff and reverses some to get the "expected" order. In the future we might switch to reversing stacktraces in Sentry, like it already works for native.
33de8da to
4d2873c
Compare
loewenheim
reviewed
Nov 25, 2025
Comment on lines
-1103
to
+1120
| module: uu0.MapAnnotations | ||
| abs_path: SourceFile | ||
| lineno: 0 | ||
| index: 1 | ||
| - function: createProjectionMarker | ||
| filename: MapAnnotations.kt | ||
| module: com.mycompany.android.MapAnnotations | ||
| abs_path: MapAnnotations.kt | ||
| lineno: 0 | ||
| index: 1 | ||
| - function: m | ||
| filename: SourceFile | ||
| module: ev.StuffKt$$ExternalSyntheticOutline0 | ||
| abs_path: SourceFile | ||
| lineno: 1 | ||
| index: 2 | ||
| method_synthesized: true | ||
| lineno: 43 | ||
| index: 1 |
Contributor
There was a problem hiding this comment.
This output changes because the test contains previously unimplemented outline features.
loewenheim
approved these changes
Nov 28, 2025
romtsn
added a commit
to getsentry/sentry
that referenced
this pull request
Dec 3, 2025
Since the introduction of getsentry/symbolicator#1817 Symbolicator can actually remove frames, not only expand/remap them, so this change is necessary to not display synthetic frames generated by R8/proguard. NOTE: We only apply this logic for `java` frames to account for mixed stacktraces. ## Before <img width="1474" height="396" alt="Google Chrome 2025-12-03 13 03 20" src="https://github.com/user-attachments/assets/ca6b2326-03d1-420c-8bc0-6ed6777f290d" /> ## After <img width="1107" height="357" alt="Finder 2025-12-03 14 17 53" src="https://github.com/user-attachments/assets/be5df668-eae8-4f5a-9be6-188b7f4ebc49" />
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempts to re-implement the logic we have now in rust-proguard to support outline/outlineCallsite annotations.
Depends on getsentry/rust-proguard#64 to be merge and released first