Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
25e5984
[local-explorer-ui] Add Observability (Traces) tab
nickpatt Jun 18, 2026
3bdcf11
[experiments] Add wobs-local-traces prototype (demo + trace collector)
nickpatt Jun 18, 2026
11dcd6d
[docs] Add branch overview for local-dev observability work
nickpatt Jun 18, 2026
7009c5f
[local-explorer-ui] Match dashboard traces list + add filtering
nickpatt Jun 18, 2026
2f7da2c
[local-explorer-ui] Use Kumo DropdownMenu for trace filters
nickpatt Jun 18, 2026
9186854
[local-explorer-ui] Add Events (logs) view
nickpatt Jun 18, 2026
416d863
Merge Traces and Events into single Observability tab
ZinMK Jun 18, 2026
d02ec6e
Add key:value query language to Observability search bars
ZinMK Jun 19, 2026
ce497c0
Rename Events view to Logs in the Observability switcher
ZinMK Jun 19, 2026
6c608a7
Add agent/json collector output, log-level filter, and demo control p…
ZinMK Jun 19, 2026
d70a98b
Document control panel URL and UI troubleshooting in run guide
ZinMK Jun 19, 2026
0f0680c
[miniflare] Experimental local-dev observability auto-capture
nickpatt Jun 19, 2026
d92b715
Merge branch 'cloudflare:main' into tail-observability-experiment
nickpatt Jun 22, 2026
c86b450
[observability] Tests, Local Explorer UX fixes, and prototype cleanup
nickpatt Jun 22, 2026
43deeb9
[miniflare] Enrich local observability capture to match production ST…
nickpatt Jun 22, 2026
3c2dc13
[local-explorer-ui] Add "Clear" to the Observability tab
nickpatt Jun 22, 2026
78e015e
[miniflare] Support multi-worker distributed traces in local observab…
nickpatt Jun 22, 2026
7ff70dd
[local-explorer-ui] Add MCP integration to the Observability tab
nickpatt Jun 22, 2026
5d69481
[miniflare] Auto-provision the local-observability MCP server path
nickpatt Jun 22, 2026
9e7e0c8
[local-explorer-ui] Delineate worker-invocation boundaries in the wat…
nickpatt Jun 22, 2026
853e06e
[local-explorer-ui] Don't flag Vite module-runner invocations as work…
nickpatt Jun 22, 2026
82fb110
[local-explorer-ui] Add a toggle to hide Vite dev-runner plumbing spans
nickpatt Jun 22, 2026
525e502
[local-explorer-ui] Move MCP to its own sidebar tab
nickpatt Jun 22, 2026
0fa6d6f
[wrangler] Add --experimental-observability flag
nickpatt Jun 22, 2026
dec6719
Merge branch 'cloudflare:main' into tail-observability-experiment
nickpatt Jun 22, 2026
595d4e2
Add setup.sh + OBSERVABILITY.md for trying the local-observability ex…
nickpatt Jun 22, 2026
579aa83
[local-explorer-ui] Add one-click MCP install buttons for opencode/Cl…
nickpatt Jun 23, 2026
6f55529
Remove clone-and-build scaffolding (use pkg.pr.new prerelease instead)
nickpatt Jun 23, 2026
fcc35c1
[local-explorer-ui] Show inline confirmation after MCP one-click install
nickpatt Jun 23, 2026
10bb49a
[wrangler] Add experimental `wrangler observability` commands
nickpatt Jun 23, 2026
e744ead
[wrangler] Make the local-dev observability MCP server opt-in
nickpatt Jun 23, 2026
8cbcb9f
[wrangler] Let `wrangler observability skill --install` install into …
nickpatt Jun 23, 2026
40d4886
[wrangler] Hide Vite dev-runner plumbing in `wrangler observability` …
nickpatt Jun 23, 2026
0c949fa
[vite-plugin] Add experimental.observability opt-in + document Vite i…
nickpatt Jun 24, 2026
466d37c
[miniflare] Add a codemode MCP endpoint to the Local Explorer
nickpatt Jun 24, 2026
2d55731
Govern hosted Codemode MCP access
ZinMK Jun 24, 2026
ca251e7
Reframe MCP page for hosted Codemode endpoint
ZinMK Jun 24, 2026
cfab12d
Remove standalone local-observability stdio MCP plumbing
ZinMK Jun 24, 2026
f0e7a76
Add local observability developer guide
ZinMK Jun 24, 2026
cf840ce
Merge branch 'cloudflare:main' into tail-observability-experiment
nickpatt Jun 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .changeset/local-dev-observability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"@cloudflare/vite-plugin": minor
"miniflare": minor
"wrangler": minor
---

Add experimental local-dev observability trace capture (`X_LOCAL_OBSERVABILITY`)

When `X_LOCAL_OBSERVABILITY=true` is set, `wrangler dev` and the Cloudflare Vite
plugin automatically capture structured traces for whatever worker you're
developing — no extra config. Miniflare injects an internal trace collector as
a streaming-tail consumer of your worker(s), enables the required compatibility
flags, and persists each request's spans and logs to an internal D1 store that
the Local Explorer's Observability tab reads. This is experimental and off by
default; it can change without a major version bump.

The MCP server (which lets an agent inspect the local dev environment over MCP)
is now opt-in behind `X_LOCAL_OBSERVABILITY_MCP=true` and its Local Explorer tab
is hidden unless enabled — the `wrangler observability` CLI is the primary way to
inspect captured traces and logs, with MCP as an optional alternative.

When enabled, the Local Explorer also hosts a "codemode" MCP endpoint at
`/cdn-cgi/explorer/mcp`: rather than dumping the whole OpenAPI spec into an
agent's context, it exposes a `run` tool that executes a JS snippet against a
`cf` client (D1, KV, R2, Durable Objects, Workflows, and the trace store) and
returns only the data the agent asked for. The snippet runs in-process via the
worker's UnsafeEval capability, so it needs no separate install.
17 changes: 17 additions & 0 deletions .changeset/wrangler-observability-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"wrangler": minor
---

Add experimental `wrangler observability` commands for inspecting local-dev traces and logs

When you run `wrangler dev --experimental-observability`, traces, spans, and console logs are captured into a local store. These new commands let you — or a coding agent already running `wrangler` — query that captured data directly from the CLI, both while `wrangler dev` is running and after it has exited:

- `wrangler observability logs --last N` — print the most recent console logs (`--level` to filter)
- `wrangler observability traces --last N` — recent invocation summaries as CSV
- `wrangler observability trace <trace_id>` — the spans of a single trace as CSV
- `wrangler observability query "<SQL>"` — run a read-only SQL query against the trace store (CSV, or `--json`)
- `wrangler observability skill` — print the schema and example queries as guidance for an agent (or `--install` to write it as a `SKILL.md` into detected AI agents' skills directories, reusing the same agent detection as `wrangler --install-skills`)

The store is read read-only via Node's built-in SQLite, so querying does not require a running `wrangler dev` server. All commands accept `--persist-to` to match the directory used by `wrangler dev`.

Under `vite dev`, `traces` and `trace` hide the Vite module-runner plumbing spans by default (so span counts reflect your worker's real spans); pass `--include-runner-spans` to show them.
Loading
Loading