Skip to content

Commit b4e7945

Browse files
Add comments
Signed-off-by: Nikhil Sinha <[email protected]>
1 parent 29c2a76 commit b4e7945

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/otel/traces.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ fn flatten_span_record(span_record: &Span) -> Vec<Map<String, Value>> {
292292
if let Some(status) = &span_record.status {
293293
span_record_json.extend(flatten_status(status));
294294
}
295-
295+
296+
// if span_record.events is null, code should still flatten other elements in the span record - this is handled in the if block
297+
// else block handles the flattening the span record that includes events and links records in each span record
296298
if span_records_json.is_empty() {
297299
span_records_json = vec![span_record_json];
298300
} else {

0 commit comments

Comments
 (0)