ST01 Ghost span, one of ten ways LLM telemetry goes wrong

LLM span missing after the stream closes early

The app made the call, and no finished span ever reaches a backend. The call is not there. Its cost, its latency and its error are all absent, and nothing says so. Streams that the app leaves early or that fail mid-way are the usual victims.

What causes it

The library ends its span when the stream sends its last chunk. When the app stops reading before that, with a break, a close or an exception, or when the connection fails mid-way, the code that ends the span does not run. A span that never ends is never exported, so the backend gets nothing for the call.

Which versions show it

In the run of November 27, 2026, at the pinned versions, with spantruth 0.6.0. Each scenario links to its finding, with the exported spans and the command that reproduces it. The latest releases can differ.

How to check your project

Run this in your project's directory:

uvx spantruth doctor

It reads your lock file, or your requirements if you have no lock file, and tests the libraries it recognizes, at your versions, against a local fake provider. It needs no API key and does not run your code. The first run downloads those library versions into environments of its own. A finding of this kind is named ST01 Ghost span.

How to fix it

Upgrade to a release that ends the span when the stream is closed, fails or is left unread. Until your library has one, read each stream to its end where you can.

Fixed upstream in these releases:

Reported in public:

the report · fixed upstream · source