Workers - AI agents can debug Workers with local tracing
- Announced
- Tags
- Workers
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-08-04-local-tracing/
<p><code>wrangler dev</code> and <code>vite dev</code> automatically capture structured OpenTelemetry traces and correlated console logs during local Worker invocations.</p> <div tabindex="-1" class="heading-wrapper level-h4"><h4 id="debug-with-ai-agents">Debug with AI agents</h4><a class="anchor-link" href="#debug-with-ai-agents"><span aria-hidden="true" class="anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span></a></div> <p>When the tooling detects an AI agent session, it prints a terminal hint pointing to the <a href="https://developers.cloudflare.com/workers/local-development/local-explorer/#api">Local Explorer API</a> at <code>/cdn-cgi/local/explorer/api</code>. The API serves an OpenAPI schema and exposes a read-only observability query endpoint for discovering telemetry, querying traces and logs, and inspecting binding state.</p> <p>The agent can identify the exact failing operation, fix the code, rerun the request, and verify the result. This debug loop requires no deployment or temporary logs.</p> <div tabindex="-1" class="heading-wrapper level-h4"><h4 id="inspect-traces-in-local-explorer">Inspect traces in Local Explorer</h4><a class="anchor-link" href="#inspect-traces-in-local-explorer"><span aria-hidden="true" class="anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span></a></div> <p>Humans can inspect the same <a href="https://developers.cloudflare.com/workers/observability/traces/">traces</a> and correlated console logs in the Local Explorer browser UI. Each trace shows spans, timing, attributes, and errors.</p> <img src="https://developers.cloudflare.com/cdn-cgi/image/onerror=redirect,width=2048,height=847,format=webp/_astro/local-trace-failed-request.Bf0avznU.png" alt="Local Explorer showing a failed Worker trace with spans, timing, and errors" loading="lazy" decoding="async" width="2048" height="847"> <p>Automatic spans cover handler calls, outbound <code>fetch()</code> calls, and binding calls. Custom spans appear alongside these automatic spans.</p> <p>For more details, refer to the <a href="https://developers.cloudflare.com/workers/local-development/local-explorer/">Local Explorer documentation</a>.</p>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.