Function reparent_broken_spans

Source
pub fn reparent_broken_spans(event: &mut Event)
Expand description

Enforce that every span has a valid parent. If any parent_span_id is pointing nowhere, the span is re-parented onto the root span.

This is to avoid any nasty surprises in the span buffer specifically. Other readers of spans (such as the frontend’s tree component) were already able to deal with detached spans.