Skip to content

Commit 3a1981c

Browse files
committed
Add new frame fields for metric kit flamegraphs
1 parent afe5771 commit 3a1981c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

relay-event-schema/src/protocol/stacktrace.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ pub struct Frame {
104104
#[metastructure(skip_serialization = "null")]
105105
pub context_line: Annotated<String>,
106106

107+
/// The index of the parent frame, used for flamegraphs provided by iOS.
108+
#[metastructure(skip_serialization = "null")]
109+
pub parent_index: Annotated<i64>,
110+
111+
/// The number of times this frame was sampled, used for flamegraphs provided by iOS.
112+
#[metastructure(skip_serialization = "null")]
113+
pub sample_count: Annotated<u64>,
114+
107115
/// Source code of the lines after `lineno`.
108116
#[metastructure(skip_serialization = "empty")]
109117
pub post_context: Annotated<Array<String>>,
@@ -600,6 +608,8 @@ mod tests {
600608
thread_id: Annotated::new(ThreadId::Int(7)),
601609
other: Default::default(),
602610
}),
611+
parent_index: Annotated::empty(),
612+
sample_count: Annotated::empty(),
603613
other: {
604614
let mut vars = Object::new();
605615
vars.insert(

0 commit comments

Comments
 (0)