July 7, 2026 · Cloudflare
Workers - Workers Observability now surfaces warning attributes on spans for non-fatal errors
Workers Observability now attaches warning attributes to spans for non-fatal telemetry issues. These attributes help you identify instrumentation issues.
When a warning is present, both attributes are set together:
cloudflare.warning.type— An identifier indicating the type of warning condition.cloudflare.warning.message— A free-form, human-readable explanation of the warning condition.
For example, recording an entire webhook payload as a span attribute can exceed the span data limit:
export default {
async fetch(request, env, ctx) {
const payload = await request.text();
return ctx.tracing.enterSpan("receive-webhook", (span) => {
span.setAttribute("webhook.payload", payload);
return new Response("Accepted", { status: 202 });
});
},
};export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext) {
const payload = await request.text();
return ctx.tracing.enterSpan("receive-webhook", (span) => {
span.setAttribute("webhook.payload", payload);
return new Response("Accepted", { status: 202 });
});
},
};
The Worker still returns 202 Accepted, but tracing drops the oversized attribute. The span includes cloudflare.warning.type set to span_data_limit_exceeded and a cloudflare.warning.message identifying the rejected attribute and its size.
For more information, refer to Warning attributes.