Skip to content

Commit fc64968

Browse files
authored
fix trace agg (#948)
1 parent 8ba0a95 commit fc64968

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app-server/src/ch/traces.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ pub struct TraceAggregation {
9494
pub metadata: Option<serde_json::Value>,
9595
pub tags: Vec<String>,
9696
pub num_spans: i32,
97-
pub top_span_id: Uuid,
98-
pub top_span_name: String,
97+
pub top_span_id: Option<Uuid>,
98+
pub top_span_name: Option<String>,
9999
pub top_span_type: u8,
100100
pub trace_type: u8,
101101
}
@@ -128,8 +128,8 @@ impl TraceAggregation {
128128
metadata: None,
129129
tags: Vec::new(),
130130
num_spans: 0,
131-
top_span_id: Uuid::nil(),
132-
top_span_name: String::new(),
131+
top_span_id: None,
132+
top_span_name: None,
133133
top_span_type: 0,
134134
trace_type: 0,
135135
});
@@ -180,8 +180,8 @@ impl TraceAggregation {
180180
}
181181

182182
if span.parent_span_id == Uuid::nil() {
183-
entry.top_span_id = span.span_id;
184-
entry.top_span_name = span.name.clone();
183+
entry.top_span_id = Some(span.span_id);
184+
entry.top_span_name = Some(span.name.clone());
185185
entry.top_span_type = span.span_type as u8;
186186
}
187187

0 commit comments

Comments
 (0)