fn span_duration_nano(span: &TraceSpan) -> i64Expand description
Computes the span duration as the signed duration_nano value written by
the v1 data model.
A span whose end precedes its start carries no meaningful duration; it
clamps to 0 instead of wrapping — a negative duration_nano would fail
the checked Int64→UInt64 coercion into pre-existing unsigned tables and
would break unsigned readers such as the Jaeger query API. A duration
that does not fit i64 saturates at i64::MAX. Clamping at the source
keeps new Int64 tables and existing UInt64 tables behaving identically:
the written value is always a non-negative, in-range i64.