diff --git a/crates/symbolicator-proguard/src/interface.rs b/crates/symbolicator-proguard/src/interface.rs index 8b1378917..286501196 100644 --- a/crates/symbolicator-proguard/src/interface.rs +++ b/crates/symbolicator-proguard/src/interface.rs @@ -1 +1,62 @@ +use std::sync::Arc; +use serde::{Deserialize, Serialize}; +use symbolic::common::DebugId; +use symbolicator_service::types::{RawObjectInfo, Scope}; +use symbolicator_sources::SourceConfig; + +#[derive(Debug, Clone)] +pub struct SymbolicateJvmStacktraces { + pub scope: Scope, + pub sources: Arc<[SourceConfig]>, + pub exceptions: Vec, + pub modules: Vec, + /// Whether to apply source context for the stack frames. + pub apply_source_context: bool, +} + +#[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq)] +pub struct JvmFrame { + #[serde(skip_serializing_if = "Option::is_none")] + pub function: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub filename: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub module: Option, + + pub abs_path: String, + + pub lineno: u32, + + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub pre_context: Vec, + + #[serde(skip_serializing_if = "Option::is_none")] + pub context_line: Option, + + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub post_context: Vec, + + #[serde(skip_serializing_if = "Option::is_none")] + pub in_app: Option, +} + +#[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq)] +pub struct JvmException { + #[serde(rename = "type")] + ty: String, + module: String, + stacktrace: JvmStacktrace, +} + +#[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq)] +pub struct JvmStacktrace { + frames: Vec, +} + +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)] +pub struct JvmModule { + uuid: DebugId, +}