You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An unreadable span timestamp becomes a real-looking duration in ingest_traces #1982
The obvious harm is a false duration of zero: a span that genuinely took no time and a
span whose timestamps were garbage become the same row.
It is worse than that. An unreadable start time reads as 0, so the span reports the
whole end time as its duration. A test pinning this fails on unfixed code like so:
That is 1.05 seconds of measured time for a span whose start was never read, and nothing
downstream can tell that number from a real measurement.
I expected an unreadable timestamp to produce an explicit unknown rather than a plausible
duration.
Reproduction
Call ingest_traces with a span whose start_nano is unreadable — an empty string, null, or any non-numeric text — and a valid end_nano of, say, 1050000000.
Read the span back.
Result: duration_ns is 1050000000, indistinguishable from a real 1.05 s span.
Expected: an explicit unknown, so a consumer can tell measured time from missing time.
The zero-duration case reproduces the same way with both timestamps unreadable.
Logs
No error is emitted — the unreadable timestamp is accepted as 0.
Thank you for isolating the unreadable-start case and measuring the false 1.05-second duration. Current main still has cbm_extract_http_info() call the unchecked cbm_parse_duration() helper. PR #1881 introduces the checked companion and preserves the HTTP method and path while marking only the duration unknown. Its scope note also correctly records that this helper has no production caller on the current tree. Leaving this open until the PR lands.
Fixed on main by 9d0c6a1 (#1881, thanks @CaptainMittens): an unreadable span timestamp no longer becomes a real-looking duration. It will be in the next release.
Activity
DeusData commentedon Sep 1, 2026
Thank you for isolating the unreadable-start case and measuring the false 1.05-second duration. Current
mainstill hascbm_extract_http_info()call the uncheckedcbm_parse_duration()helper. PR #1881 introduces the checked companion and preserves the HTTP method and path while marking only the duration unknown. Its scope note also correctly records that this helper has no production caller on the current tree. Leaving this open until the PR lands.DeusData commentedon Sep 4, 2026
Fixed on main by 9d0c6a1 (#1881, thanks @CaptainMittens): an unreadable span timestamp no longer becomes a real-looking duration. It will be in the next release.