pub fn finish(self) -> Result<Span<S, T>, SpanBuilderFinishError> {
        if self.parents.is_empty() {
            Ok(self.current_span)
        } else {
            Err(SpanBuilderFinishError::OpenSpan(self.current_span.name.to_string()))
        }
    }
Get the root span, consuming the builder.

Yields an error if the current span is not the root span.
crates/core/machine/src/utils/span.rs