diff --git a/CHANGELOG.md b/CHANGELOG.md index f81daf070..d8141a127 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ - Bump `proguard` from v5.5.0 to v5.6.1 This also bumps the proguard cache version from v3 to v4. ([#1734](https://github.com/getsentry/symbolicator/pull/1734)) +### Various fixes & improvements + +- Symbolicated JVM frames are now marked according to whether their method was + synthesized by the compiler. ([#1735](https://github.com/getsentry/symbolicator/pull/1735)) + ## 25.7.0 ### Various fixes & improvements diff --git a/crates/symbolicator-proguard/src/interface.rs b/crates/symbolicator-proguard/src/interface.rs index 6f35a3595..9d5f5cd65 100644 --- a/crates/symbolicator-proguard/src/interface.rs +++ b/crates/symbolicator-proguard/src/interface.rs @@ -103,6 +103,14 @@ pub struct JvmFrame { /// instead of using line numbers. #[serde(skip_serializing_if = "Option::is_none")] pub signature: Option, + + /// Whether this frame's method was synthesized by the compiler. + #[serde(default, skip_serializing_if = "is_false")] + pub method_synthesized: bool, +} + +fn is_false(b: &bool) -> bool { + !*b } /// An exception in a JVM event. diff --git a/crates/symbolicator-proguard/src/symbolication.rs b/crates/symbolicator-proguard/src/symbolication.rs index e5c7129bd..967d9f7ed 100644 --- a/crates/symbolicator-proguard/src/symbolication.rs +++ b/crates/symbolicator-proguard/src/symbolication.rs @@ -373,6 +373,7 @@ impl ProguardService { .file() .map(String::from) .or_else(|| original_frame.filename.clone()), + method_synthesized: new_frame.method_synthesized(), ..original_frame.clone() }; @@ -877,6 +878,7 @@ y.b -> y.b: abs_path: Some("CustomThreadFactory".into()), filename: Some("CustomThreadFactory".into()), index: 0, + method_synthesized: true, ..Default::default() } ); diff --git a/crates/symbolicator-proguard/tests/integration/snapshots/integration__proguard__source_lookup_with_proguard.snap b/crates/symbolicator-proguard/tests/integration/snapshots/integration__proguard__source_lookup_with_proguard.snap index fe3a27bfc..f41bfb680 100644 --- a/crates/symbolicator-proguard/tests/integration/snapshots/integration__proguard__source_lookup_with_proguard.snap +++ b/crates/symbolicator-proguard/tests/integration/snapshots/integration__proguard__source_lookup_with_proguard.snap @@ -102,6 +102,7 @@ stacktraces: lineno: 0 in_app: true index: 18 + method_synthesized: true - function: onCreate$lambda-1 module: io.sentry.samples.instrumentation.ui.EditActivity lineno: 37