Skip to content

feat(proguard): Support outline and outlineCallsite annotations#1817

Merged
romtsn merged 31 commits intomasterfrom
rz/feat/outline-callsite-support
Nov 28, 2025
Merged

feat(proguard): Support outline and outlineCallsite annotations#1817
romtsn merged 31 commits intomasterfrom
rz/feat/outline-callsite-support

Conversation

@romtsn
Copy link
Copy Markdown
Member

@romtsn romtsn commented Nov 13, 2025

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

@romtsn romtsn requested a review from a team as a code owner November 13, 2025 14:33
loewenheim and others added 19 commits November 17, 2025 17:54
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.
@loewenheim loewenheim force-pushed the rz/feat/outline-callsite-support branch from 33de8da to 4d2873c Compare November 25, 2025 14:32
@loewenheim loewenheim changed the base branch from master to sebastian/frame-order November 25, 2025 14:33
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
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.

This output changes because the test contains previously unimplemented outline features.

Base automatically changed from sebastian/frame-order to master November 27, 2025 14:18
@romtsn romtsn enabled auto-merge (squash) November 28, 2025 11:08
@romtsn romtsn merged commit 2cae766 into master Nov 28, 2025
23 checks passed
@romtsn romtsn deleted the rz/feat/outline-callsite-support branch November 28, 2025 11:20
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"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants