# Workers - Workers tracing — write custom spans with new startActiveSpan() and span.end() runtime APIs

Publisher-attributed story with a reviewed brief or permitted publisher paragraph. The original publisher is responsible for the linked reporting.

- Publisher: Cloudflare Developers
- Category: Cloud
- Original publication time: 2026-07-28T00:00:00Z
- First observed by NexusTechWire: 2026-10-01T15:54:33Z
- Original source: https://developers.cloudflare.com/changelog/post/2026-07-28-start-active-span/
- NexusTechWire record: https://nexustechwire.com/news/news-84682381474c7386fb86

## From the publisher

The Workers runtime now provides built-in tracing.startActiveSpan() and span.end() APIs, allowing you to write custom spans for operations that last beyond a single callback — for example, instrumenting a stream pipeline where the span should stay open until the stream is fully consumed. This augments the existing API for writing custom spans, tracing.enterSpan(), which automatically ends a span when its callback is returned.

Source license: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Publisher excerpt shortened and converted to plain text. Original source license applies.

Read the full original: [Cloudflare Developers](https://developers.cloudflare.com/changelog/post/2026-07-28-start-active-span/)

This record does not reproduce the complete article or represent independent confirmation of every source claim.
