Session replay your coding agent can read

Session replays are video for people. Dataflare also turns every session into text, so a coding agent can read what happened, find the selector in your code and fix it.

Turn it on

<script defer src="https://glass.<you>.workers.dev/s.js" data-project="my-app"
  data-replay-sample-rate="0.1" data-replay-on-error-sample-rate="1"></script>

This records one session in ten, plus any session where an error happens (the recorder keeps a short buffer, so you see what led up to it). Every input is masked. Network requests are recorded as method, URL without its query string, status and timing; headers and bodies never are.

What the transcript contains

00:41 Clicked "Create account" (button)  #signup > button
00:41 Rage-clicked "Create account" (button) ×5
00:42 ERROR TypeError: crypto.randomUUID is not a function
      at submit (signup.js:88:14)
00:42 Request failed: POST /api/signup → 500 (210 ms)

Pages, clicks with labels and CSS selectors, rage clicks, dead clicks (a click after which nothing changed), errors with stack frames, failed and slow requests, and console errors. replay_snapshot describes what was on screen at any moment: headings, buttons and whether they were disabled, dialogs, masked form fields.

Ask about it

  • "Find sessions where people started checkout and didn't finish, and tell me what went wrong." The agent calls list_replays with did_event and not_event, then summarise_replay on the most frustrated ones.
  • "What's annoying users this week?" analyse_replays groups the most rage-clicked elements, common errors and failing requests across sessions, with example links.

Findings can be pinned to a moment with annotate_replay, and show up on the player's timeline for people too.

Where recordings live

In an R2 bucket in your Cloudflare account, gzipped, deleted after 30 days by default (GLASS_REPLAY_RETENTION_DAYS). See the cost calculator for what recording costs at your volume.