---
description: Workers Observability now adds warning attributes to spans to help identify non-fatal telemetry issues.
title: Workers Observability now surfaces warning attributes on spans for non-fatal errors
image: https://developers.cloudflare.com/changelog/post/2026-07-07-warning-attributes/og.png?v=37ebc5566a9264cb
---

[Skip to content](#main-content)

[View RSS feeds](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) [ Subscribe to RSS](https://developers.cloudflare.com/changelog/rss/index.xml)

[Back to all posts](https://developers.cloudflare.com/changelog)

July 7, 2026

## Workers Observability now surfaces warning attributes on spans for non-fatal errors

[Workers](https://developers.cloudflare.com/workers/)

Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/changelog/post/2026-07-07-warning-attributes/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

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:

```js
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 });
		});
	},
};
```

```ts
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](https://developers.cloudflare.com/workers/observability/traces/spans-and-attributes/#warning-attributes).

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://developers.cloudflare.com/changelog/post/2026-07-07-warning-attributes/#page","headline":"Workers Observability now surfaces warning attributes on spans for non-fatal errors","description":"Workers Observability now adds warning attributes to spans to help identify non-fatal telemetry issues.","url":"https://developers.cloudflare.com/changelog/post/2026-07-07-warning-attributes/","inLanguage":"en","image":"https://developers.cloudflare.com/changelog/post/2026-07-07-warning-attributes/og.png?v=37ebc5566a9264cb","dateModified":"2026-07-07","datePublished":"2026-07-07","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
