Cloudflare Workers adds custom tracing spans that can stay open across async work

irvinebroque · x · 2026-07-29

Cloudflare Workers now exposes built-in tracing APIs, tracing.startActiveSpan() and span.end(), for spans that need to stay open beyond a single callback.

The update extends the existing tracing.enterSpan() API, which auto-closes spans when a callback returns. With startActiveSpan(), developers can keep a span alive while work continues asynchronously, then close it manually with span.end().

Cloudflare highlights use cases like streaming pipelines, where instrumentation needs to remain open until the full stream is consumed or cancelled.

Related event: Cloudflare Workers Introduces Cross-Async Tracing API(2 posts)→

Original post →

More from Infra

Infra channel →