# Workers - Workers tracing — new spanContext(), setStatus(), and updateName() 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-10-26T00:00:00Z
- First observed by NexusTechWire: 2026-10-26T21:50:37Z
- Original source: https://developers.cloudflare.com/changelog/post/2026-10-26-span-context-status-update-name/
- NexusTechWire record: https://nexustechwire.com/news/news-e9928112b52dc533a287

## From the publisher

Custom spans in Workers now support three more methods from the OpenTelemetry span API. span.spanContext() returns the span's traceId, spanId, and traceFlags. The IDs match the trace and span IDs in Workers Observability and in exported traces, so you can log them or return them to clients to correlate a request with its trace. span.setStatus(status) sets the span status to "unset", "ok", or "error", with an optional message for errors. Span status is included in traces exported to OpenTelemetry destinations. The Workers Observability dashboard does not display it yet. span.updateName(name) renames a span after it starts, such as once you know which route a request matched. You can also rename the invocation's root span returned by tracing.getActiveSpan().

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-10-26-span-context-status-update-name/)

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