---
search:
  tags:
    - Observability
    - GET
seo:
  description: >-
    text/event-stream, the frames sproutboat tail reads. Each data: line is…
    Reference for the GET /v1/apps/{project}/tail endpoint in the Sproutboat
    Cloud API.
sidebar:
  label: Stream a running app's events live
  badge: GET
title: Stream a running app's events live
type: openapi-operation
---
`text/event-stream`, the frames `sproutboat tail` reads. Each `data:` line is one JSON object with a `type`:

- `ready`, once, first.
- `event`, with an `event` object shaped like a `wrangler tail` event: `scriptName`, `outcome` (`ok`, `exception`, `exceededCpu`,
  `exceededWallTime`, `canceled`, `rateLimited`, ...), `eventTimestamp` (ms), `event` (`{request: {url, method}, response: {status}}`
  for a request, `null` otherwise), `handler` (`fetch`, `scheduled` or `trigger`: which handler ran; an addition to the Wrangler shape), `cpuTime` (always `null`), `wallTime` (ms), `logs` (`[{level, message: [string], timestamp}]`) and
  `exceptions` (`[{name, message, timestamp, stack?}]`). A request, a console line and an error are **separate events**: the host
  cannot tell which request printed a line, so lines are not grouped under their request, and their `level` is always `log`.
  `url` is the full request URL **without its query string**.
- `dropped`, with `count` (events) or `bytes`, and `reason` (`rate`: over 100 events a second after the filters; `backlog`: the client
  or the host fell behind and output was skipped).
- `closed`, with a `reason` (`time`: the session cap; `host`: the host closed its side; `gone`: the app was deleted). The stream then
  ends. A client reconnects.

A `: keepalive` comment arrives every 15 seconds. A session lasts at most 10 minutes; reconnect after `closed`. Events are live only:
nothing is replayed (use `GET /v1/apps/{project}/logs` for what was printed before). Limits: 5 live viewers per app, 10 per team,
and a bounded number per host (a 429 `tail-viewers` says which `scope`). Secret values of 8 characters or more are removed as in
`GET /v1/apps/{project}/logs`.

The `status`, `method`, `outcome` and `sampling-rate` filters apply to request events; console lines and errors always pass them, so
the lines of a failing request are not hidden. `search` applies to every event.

`GET /v1/apps/{project}/tail`
