From 3a1981ca7c070d689f588bd9cad0f5070b85a2a2 Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Thu, 15 Jan 2026 14:38:12 -0800 Subject: [PATCH] Add new frame fields for metric kit flamegraphs --- relay-event-schema/src/protocol/stacktrace.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/relay-event-schema/src/protocol/stacktrace.rs b/relay-event-schema/src/protocol/stacktrace.rs index d0b90b7b14b..3cd22f5f91b 100644 --- a/relay-event-schema/src/protocol/stacktrace.rs +++ b/relay-event-schema/src/protocol/stacktrace.rs @@ -104,6 +104,14 @@ pub struct Frame { #[metastructure(skip_serialization = "null")] pub context_line: Annotated, + /// The index of the parent frame, used for flamegraphs provided by iOS. + #[metastructure(skip_serialization = "null")] + pub parent_index: Annotated, + + /// The number of times this frame was sampled, used for flamegraphs provided by iOS. + #[metastructure(skip_serialization = "null")] + pub sample_count: Annotated, + /// Source code of the lines after `lineno`. #[metastructure(skip_serialization = "empty")] pub post_context: Annotated>, @@ -600,6 +608,8 @@ mod tests { thread_id: Annotated::new(ThreadId::Int(7)), other: Default::default(), }), + parent_index: Annotated::empty(), + sample_count: Annotated::empty(), other: { let mut vars = Object::new(); vars.insert(