TECHNOLOGY

Synchronous span processors: telemetry work can outlive the measured span

In this article
THE QUICK TAKE

Measure around Span.End as well as inside the span when synchronous processors may delay the request path.

The diagnostic situation

A request trace reports short handling time while client latency rises after a custom telemetry processor is enabled. The processor performs work during span completion, after the span’s end timestamp has been set. The trace cannot necessarily reveal its own added delay. Calling the component observability does not place its execution outside the application’s critical path.

Why the observation changes meaning

The tracing SDK specifies synchronous OnStart and OnEnd callbacks and says they should not block or throw. OnEnd runs after the end timestamp is already set. The API’s fast-path intentions do not guarantee that arbitrary custom processors obey them. A processor’s configuration, serialization or synchronous export integration can therefore add wall time not represented by the completed span duration.

Define the instrumentation contract

Inventory registered processors and what each performs on the calling thread. Separate span timestamp duration, time spent in End and client-observed completion. Identify where asynchronous batching begins rather than assuming all exporters are detached. Keep the measurement harness independent from the processor under test, so the same delayed instrumentation does not define both the observation and its reference.

A bounded verification procedure

Use a synthetic handler with a controlled test processor that introduces a bounded delay. Measure the handler scope and the enclosing completion path using a suitable local clock. Compare the original configuration, the test processor and a restored control. Inspect exported span duration alongside independent timing. This is a proposed instrumentation experiment, not a claim of measured production overhead.

Evidence required for acceptance

Acceptance evidence includes processor order, SDK version, callback behavior and independent timings with the arrival schedule. Show whether delay occurs before span creation, during recording or during completion processing. Preserve exporter queue observations separately. An unchanged span duration is not proof of zero overhead when the delayed code executes outside its timestamp boundaries but before the caller can finish.

Failure cases and limits

Batching changes queueing and delivery reliability, so replacing a synchronous path is not automatically cost-free or loss-free. Custom processors may also have legitimate bounded local work. This protocol localizes timing effects of a specific lifecycle hook; it does not promise a universally superior processor or establish inference performance from telemetry duration alone. Retain export completeness checks after any configuration change.

Measure around Span.End as well as inside the span when synchronous processors may delay the request path. OpenTelemetry tracing SDK specification; OpenTelemetry tracing API specification.

The proposed investigation of synchronous span processor latency is not an executed deployment benchmark. Related reading: Correlate SGLang request latency across workers with OpenTelemetry; Phoenix tracing in short-lived workers: ending a span does not guarantee export.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles