Tail Worker
tail_workerCapture live Worker traffic, console logs, exceptions, and outcomes for a short window to debug runtime behavior; optionally send a trigger URL to record a request while connected.
Instructions
Live-tail a Worker for a short window, like wrangler tail: returns requests, console logs, exceptions and outcomes as they happen. Works on any Worker; observability doesn't need to be enabled. Only traffic during the window is captured, so pass trigger_url to send a request once connected. For historical logs use query_worker_logs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Case-insensitive substring matched against log lines, exceptions and request URLs | |
| max_events | No | Stop early after this many matching events (default 50) | |
| errors_only | No | Only keep events whose outcome is not ok or that threw an exception | |
| script_name | Yes | The Worker to tail | |
| trigger_url | No | Optional https URL to GET once the tail is connected (e.g. the Worker route you are debugging) so the request is captured in this same call | |
| duration_seconds | No | How long to listen, in seconds (default 15, max 50 to stay inside client request timeouts) |