# PhoenixReplay v0.6.2 - Table of Contents > Session recording and replay for Phoenix LiveView ## Pages - [PhoenixReplay 📹](readme.md) - [Changelog](changelog.md) - Introduction - [Getting Started](getting-started.md) - [Why PhoenixReplay](why-phoenix-replay.md) - [How It Works](how-it-works.md) - Features - [Recording](recording.md) - [LiveComponents](live-components.md) - [Telemetry and Logs](telemetry-and-logs.md) - [Dashboard](dashboard.md) - [Storage](storage.md) - [Privacy and Security](privacy-and-security.md) - Cheatsheets - [Configuration](configuration.md) ## Modules - [PhoenixReplay.Recording.Client](PhoenixReplay.Recording.Client.md): The browser and the visit a recording came from, when the browser told PhoenixReplay (see `PhoenixReplay.Capture.Browser`) - [PhoenixReplay.Recording.Client.Landing](PhoenixReplay.Recording.Client.Landing.md): The first request of a visit, kept by `PhoenixReplay.Plug` when the `:client` config asks for it: its path, when it happened, the campaign params it carried and the site that referred it. - [PhoenixReplay.Recording.Code](PhoenixReplay.Recording.Code.md): Which code a recording was made with, as its `code`, so the player can say what changed since. - [PhoenixReplay.Recording.Diff](PhoenixReplay.Recording.Diff.md): What an event changed in an assign, for the player's **State** tab. - [PhoenixReplay.Recording.Label](PhoenixReplay.Recording.Label.md): One-line descriptions of recorded events, as the player's event list and `PhoenixReplay.Trace` show them: `save → Cart#3: qty=2`, `navigate → /orders`, `assigns form, tasks`, a query's summary, a log's level and message. - [PhoenixReplay.Recording.PointerTrack](PhoenixReplay.Recording.PointerTrack.md): The pointer track of a recording: where the pointer moved, what it pressed and how the page scrolled, on the recording's timeline. - [PhoenixReplay.Recording.State](PhoenixReplay.Recording.State.md): Client state on a recording's timeline. - [PhoenixReplay.Recording.Traffic](PhoenixReplay.Recording.Traffic.md): Where a visit came from, as Google Analytics tells it - [PhoenixReplay.Recording.Value](PhoenixReplay.Recording.Value.md): Facts about recorded values that sanitizing, redacting and diffing them share. - [PhoenixReplay.Storage.File.Index](PhoenixReplay.Storage.File.Index.md): Keeps `PhoenixReplay.Storage.File`'s summaries in memory once read, and the directory relative `:path`s resolve against. - Recording - [PhoenixReplay](PhoenixReplay.md): Session recording and replay for Phoenix LiveView. - [PhoenixReplay.Catalog](PhoenixReplay.Catalog.md): Reads and deletes recordings across the live buffer and storage. - [PhoenixReplay.Config](PhoenixReplay.Config.md): Validated runtime configuration. - [PhoenixReplay.Migration](PhoenixReplay.Migration.md): Adapts recordings whose assigns changed shape since, such as a `:dark_mode` boolean that became a `:theme`, as database migrations adapt rows. - [PhoenixReplay.Plug](PhoenixReplay.Plug.md): Keeps request context for the visit, so recordings can carry it. - [PhoenixReplay.Recorder](PhoenixReplay.Recorder.md): `on_mount` hook that records LiveView sessions. - [PhoenixReplay.Recording](PhoenixReplay.Recording.md): A recorded LiveView session. - [PhoenixReplay.Recording.Event](PhoenixReplay.Recording.Event.md): A single entry in a recording's timeline. - [PhoenixReplay.Recording.Filter](PhoenixReplay.Recording.Filter.md): Criteria for narrowing a list of `PhoenixReplay.Recording.Summary` structs. - [PhoenixReplay.Recording.Summary](PhoenixReplay.Recording.Summary.md): Lightweight description of a recording, used for listings and filtering. - [PhoenixReplay.Recording.Timeline](PhoenixReplay.Recording.Timeline.md): Navigates a recording's events by index, and knows what the replay shows at each: the view's assigns, its LiveComponents' assigns, the page URL and the browser viewport. - [PhoenixReplay.Replay](PhoenixReplay.Replay.md): How your app's recordings are replayed, as a whole. For how one LiveView renders in a replay, see `PhoenixReplay.Replay.View`; for assigns that changed shape since a recording, see `PhoenixReplay.Migration`. - [PhoenixReplay.Replay.View](PhoenixReplay.Replay.View.md): How one LiveView renders in a replay. For the whole app, such as adapting the assigns older recordings have, see `PhoenixReplay.Replay`. - [PhoenixReplay.Session.TailSampling](PhoenixReplay.Session.TailSampling.md): Decides whether a session is saved, from the `:keep` configuration. - [PhoenixReplay.Storage.Retention](PhoenixReplay.Storage.Retention.md): Deletes stored recordings beyond the configured age or count. - [PhoenixReplay.Telemetry](PhoenixReplay.Telemetry.md): Telemetry events emitted by PhoenixReplay. - [PhoenixReplay.Trace](PhoenixReplay.Trace.md): Reads recordings from code: from IEx, a script, a test, or a coding agent running code in your app. Everything is plain data, to inspect as it is. - Collectors - [PhoenixReplay.Collector](PhoenixReplay.Collector.md): Behaviour for recording `:telemetry` events alongside LiveView events. - [PhoenixReplay.Collector.Captured](PhoenixReplay.Collector.Captured.md): What a `PhoenixReplay.Collector` records for a telemetry event. - [PhoenixReplay.Collector.Ecto](PhoenixReplay.Collector.Ecto.md): Collects Ecto queries. - [PhoenixReplay.Collector.Finch](PhoenixReplay.Collector.Finch.md): Collects HTTP requests made with Finch, and so with Req. - [PhoenixReplay.Collector.Generic](PhoenixReplay.Collector.Generic.md): Collects any telemetry event. - Video export - [PhoenixReplay.Export](PhoenixReplay.Export.md): Exports recordings as videos of the replayed page and the pointer. - [PhoenixReplay.Export.Encoder](PhoenixReplay.Export.Encoder.md): Encodes captured screenshots into an H.264 MP4 with `ffmpeg`, which `PhoenixReplay.Export.FFmpeg` runs. - [PhoenixReplay.Export.FFmpeg](PhoenixReplay.Export.FFmpeg.md): Runs `ffmpeg` and follows it until it is done. - [PhoenixReplay.Export.FFmpeg.Output](PhoenixReplay.Export.FFmpeg.Output.md): Where MuonTrap writes `ffmpeg`'s output: each chunk is sent to the process following it, tagged with `ref`. - [PhoenixReplay.Export.Job](PhoenixReplay.Export.Job.md): A video export: which recording, how far it got and where the video is. - [PhoenixReplay.Export.Options](PhoenixReplay.Export.Options.md): What a video export shows and how it is encoded, as the player's export dialog and `mix phoenix_replay.export` choose it. - [PhoenixReplay.Export.Queue](PhoenixReplay.Export.Queue.md): Where video exports wait their turn and run. - [PhoenixReplay.Export.Queue.Local](PhoenixReplay.Export.Queue.Local.md): The default `PhoenixReplay.Export.Queue`: keeps video exports in memory and runs them under `PhoenixReplay.Export.TaskSupervisor`, `:max_concurrency` at a time, on the node that asked for them. They are lost when the node stops; `PhoenixReplay.Export.Queue.Oban` keeps them. - [PhoenixReplay.Export.Queue.Oban](PhoenixReplay.Export.Queue.Oban.md): A `PhoenixReplay.Export.Queue` in your [Oban](https://hexdocs.pm/oban) queue: exports survive restarts and deploys, and run on whichever node of a cluster takes them. - [PhoenixReplay.Export.Queue.Oban.Worker](PhoenixReplay.Export.Queue.Oban.Worker.md): Renders one video export in Oban; see `PhoenixReplay.Export.Queue.Oban`. - [PhoenixReplay.Export.Runtime](PhoenixReplay.Export.Runtime.md): Starts what exports need with the first export, under this supervisor: `PhoenixReplay.Web.Export.Endpoint` and a connection to Playwright, so an application that never exports runs neither. - [PhoenixReplay.Export.Schedule](PhoenixReplay.Export.Schedule.md): Which moments of a recording a video shows, and for how long. - [PhoenixReplay.Export.Screenshots](PhoenixReplay.Export.Screenshots.md): Screenshots each shot of a `PhoenixReplay.Export.Schedule` in Chromium. - [PhoenixReplay.Export.Supervisor](PhoenixReplay.Export.Supervisor.md): Supervises video export: `PhoenixReplay.Export.Runtime`, which starts the endpoint and Playwright on demand, `PhoenixReplay.Export.Queue.Local`, which queues jobs, and the task supervisor jobs run under. - [PhoenixReplay.Export.Video](PhoenixReplay.Export.Video.md): Renders one video export: plans it, captures the screenshots, encodes them, and leaves the video in the export directory. - Extension - [PhoenixReplay.Authorization](PhoenixReplay.Authorization.md): Behaviour for deciding what a dashboard viewer may see and do. - [PhoenixReplay.Redactor](PhoenixReplay.Redactor.md): Behaviour for masking sensitive text in recordings before they are stored. - [PhoenixReplay.Redactor.Obscura](PhoenixReplay.Redactor.Obscura.md): Finds personal data with [Obscura](https://hexdocs.pm/obscura) and replaces it with a placeholder such as `"[EMAIL]"`. - [PhoenixReplay.Redactor.Patterns](PhoenixReplay.Redactor.Patterns.md): Replaces matches of regexes with `"[REDACTED]"`. - [PhoenixReplay.Sanitizer](PhoenixReplay.Sanitizer.md): Behaviour for removing sensitive or bulky data before it is recorded. - [PhoenixReplay.Sanitizer.Default](PhoenixReplay.Sanitizer.Default.md): Default `PhoenixReplay.Sanitizer`. - [PhoenixReplay.Storage](PhoenixReplay.Storage.md): Behaviour for finished-recording storage, and the facade used to call it. - [PhoenixReplay.Storage.Ecto](PhoenixReplay.Storage.Ecto.md): Stores recordings in a database table through an Ecto repo. - [PhoenixReplay.Storage.Ecto.Migration](PhoenixReplay.Storage.Ecto.Migration.md): Creates and upgrades the table `PhoenixReplay.Storage.Ecto` stores recordings in. - [PhoenixReplay.Storage.File](PhoenixReplay.Storage.File.md): Stores each recording as two files in a directory. - Dashboard - [PhoenixReplay.Router](PhoenixReplay.Router.md): Mounts the PhoenixReplay dashboard in a Phoenix router. - Capture - [PhoenixReplay.Capture.Assigns](PhoenixReplay.Capture.Assigns.md): Takes the assigns a recording keeps, before the sanitizer sees them. - [PhoenixReplay.Capture.AsyncResults](PhoenixReplay.Capture.AsyncResults.md): Records LiveComponent state changed by async results. - [PhoenixReplay.Capture.Browser](PhoenixReplay.Capture.Browser.md): Builds a recording's client context: the browser's viewport and tab from LiveView's connect params and event metadata, the user agent, and the request context `PhoenixReplay.Plug` keeps for the visit. - [PhoenixReplay.Capture.Handlers](PhoenixReplay.Capture.Handlers.md): Owns the telemetry and `:logger` handlers that record sessions. - [PhoenixReplay.Capture.LiveComponents](PhoenixReplay.Capture.LiveComponents.md): Records LiveComponent state from LiveView's telemetry events. - [PhoenixReplay.Capture.Logs](PhoenixReplay.Capture.Logs.md): Records log messages in the session of the process that logged them. - [PhoenixReplay.Capture.Pointer](PhoenixReplay.Capture.Pointer.md): Records the pointer, touches and scrolling the browser sends, when `:pointer` is configured. - [PhoenixReplay.Capture.State](PhoenixReplay.Capture.State.md): Records state that lives only in the browser, which replaying the view's `render/1` cannot rebuild. - [PhoenixReplay.Capture.TelemetryEvents](PhoenixReplay.Capture.TelemetryEvents.md): Records telemetry events captured by the configured `PhoenixReplay.Collector`s. - [PhoenixReplay.Capture.ViewEvents](PhoenixReplay.Capture.ViewEvents.md): Records the events a LiveView handles, from LiveView's telemetry. - Session - [PhoenixReplay.Session.Buffer](PhoenixReplay.Session.Buffer.md): ETS buffer for in-progress recordings. - [PhoenixReplay.Session.Finalizer](PhoenixReplay.Session.Finalizer.md): Completes a finished recording and saves it with retries. - [PhoenixReplay.Session.Flusher](PhoenixReplay.Session.Flusher.md): Writes a running session's buffered events to storage as one chunk. - [PhoenixReplay.Session.Monitor](PhoenixReplay.Session.Monitor.md): Follows each recorded session from its first event to storage. - [PhoenixReplay.Session.Recovery](PhoenixReplay.Session.Recovery.md): Saves sessions whose node stopped before they ended. - Dashboard Internals - [PhoenixReplay.Web.Assets](PhoenixReplay.Web.Assets.md): Serves the dashboard's JavaScript and CSS. - [PhoenixReplay.Web.Components.Core](PhoenixReplay.Web.Components.Core.md): Building blocks of the dashboard that know nothing about recordings. These are its controls; how pages are laid out is `PhoenixReplay.Web.Components.Layout`, keycaps are in `PhoenixReplay.Web.Components.Keys`, and dialogs in `PhoenixReplay.Web.Components.Dialog`. - [PhoenixReplay.Web.Components.Dialog](PhoenixReplay.Web.Components.Dialog.md): The dashboard's modal dialog, which the export dialog and the shortcut sheet are built on. - [PhoenixReplay.Web.Components.Export](PhoenixReplay.Web.Components.Export.md): The player's video export: the dialog that chooses what an export shows, and the bar under the header that follows it. - [PhoenixReplay.Web.Components.Filters](PhoenixReplay.Web.Components.Filters.md): The recording list's filter bar: the search, when sessions started, the errors toggle, and chips for the fields of `PhoenixReplay.Web.FilterFields`, with the pickers that set them. They take a `PhoenixReplay.Recording.Filter` and a function from a filter to the list's URL, never the socket. - [PhoenixReplay.Web.Components.Keys](PhoenixReplay.Web.Components.Keys.md): Keyboard shortcuts as the dashboard shows them: keycaps, and the value of `aria-keyshortcuts` that names them for assistive technology. The shortcuts themselves are `PhoenixReplay.Web.Player.Shortcuts`. - [PhoenixReplay.Web.Components.Layout](PhoenixReplay.Web.Components.Layout.md): How the dashboard's pages are laid out: the bar across the top, panels and tabs, flash messages, progress, empty states, name–value lists and pagination. The controls inside them are `PhoenixReplay.Web.Components.Core`. - [PhoenixReplay.Web.Components.Player.EventList](PhoenixReplay.Web.Components.Player.EventList.md): The **Events** tab: the recording's events grouped by interaction, with a search, kind filters and a pane with the details of one event. It sends `seek` with an `index`, `toggle_kind` with a `kind`, `errors_only`, `search_events` with `q` and `pin_details`. - [PhoenixReplay.Web.Components.Player.Frame](PhoenixReplay.Web.Components.Player.Frame.md): The replayed page in its frame, with the bar above it: the URL, the pointer switch and the **View** menu. It sends `frame_mode` with a `value`, `rotate` and `follow_scroll`. - [PhoenixReplay.Web.Components.Player.Header](PhoenixReplay.Web.Components.Player.Header.md): The bar above the player: what was recorded, its errors, a link to the current moment and the recording's actions. It sends `seek` with an `index` to jump to the first error, `export_dialog` and `delete`. - [PhoenixReplay.Web.Components.Player.Playback](PhoenixReplay.Web.Components.Player.Playback.md): The playback controls and the timeline, and the sheet listing the keyboard shortcuts, from `PhoenixReplay.Web.Player.Shortcuts`. They send `seek` with an `index` and optionally the time `at`, `previous`, `next`, `toggle`, `speed` with a `value`, `shortcuts` and `close_shortcuts`. - [PhoenixReplay.Web.Components.Player.Visit](PhoenixReplay.Web.Components.Player.Visit.md): The **Visit** tab: the device, the other sessions of the same browser tab, where the visit came from and how it started. - [PhoenixReplay.Web.Components.RecordingList](PhoenixReplay.Web.Components.RecordingList.md): Components of the recording list. They take `PhoenixReplay.Recording.Summary` structs and functions that build URLs, never the socket. - [PhoenixReplay.Web.Components.State](PhoenixReplay.Web.Components.State.md): The player's **State** tab: the assigns at the current moment, each with a one-line preview that expands to the full value when the row cannot show it, and what the current event changed inside it, by path, from `PhoenixReplay.Recording.Diff`. - [PhoenixReplay.Web.Context](PhoenixReplay.Web.Context.md): Per-mount dashboard context built from the router options. - [PhoenixReplay.Web.Export.Access](PhoenixReplay.Web.Export.Access.md): Lets the export browser, and nothing else, into `PhoenixReplay.Web.Export.Router`. - [PhoenixReplay.Web.Export.Download](PhoenixReplay.Web.Export.Download.md): Serves an exported video to the player that asked for it. - [PhoenixReplay.Web.Export.Endpoint](PhoenixReplay.Web.Export.Endpoint.md): The endpoint the export browser loads replays from. - [PhoenixReplay.Web.Export.ErrorHTML](PhoenixReplay.Web.Export.ErrorHTML.md): Renders errors of `PhoenixReplay.Web.Export.Endpoint` as their status text, such as "Not Found" for a page asked for with an invalid token. Only the export browser sees them. - [PhoenixReplay.Web.Export.Router](PhoenixReplay.Web.Export.Router.md): The pages of `PhoenixReplay.Web.Export.Endpoint`: the stage the browser films (`PhoenixReplay.Web.Export.Stage`), the replay frame inside it (`PhoenixReplay.Web.Live.Frame`) and the dashboard's assets. Both pages check their token with `PhoenixReplay.Web.Export.Access`. - [PhoenixReplay.Web.Export.Stage](PhoenixReplay.Web.Export.Stage.md): The page the export browser films: the replay frame at the recorded viewport, centred on a dark canvas, with the player's pointer overlay over it and nothing else. - [PhoenixReplay.Web.FilterFields](PhoenixReplay.Web.FilterFields.md): The recording list's filters added with **+ Filter**, in one place: the menu lists the ones not set, the bar shows the ones set as chips, and the value picker asks for a value by each field's `control` - [PhoenixReplay.Web.Format](PhoenixReplay.Web.Format.md): Formats times, durations, devices and visit details for the dashboard. - [PhoenixReplay.Web.Highlight](PhoenixReplay.Web.Highlight.md): Highlights code in the player with `Lumis`: collected SQL, and recorded values as `PhoenixReplay.Recording.Value.inspect/2` writes them. - [PhoenixReplay.Web.Layouts](PhoenixReplay.Web.Layouts.md): Root layouts for the dashboard and the default replay frame. - [PhoenixReplay.Web.Live.Frame](PhoenixReplay.Web.Live.Frame.md): Re-renders a recorded view with its recorded assigns. - [PhoenixReplay.Web.Live.Index](PhoenixReplay.Web.Live.Index.md): Lists recordings, live sessions first, narrowed by a `PhoenixReplay.Recording.Filter` kept in the URL. - [PhoenixReplay.Web.Live.ReplayComponent](PhoenixReplay.Web.Live.ReplayComponent.md): Stands in for a recorded LiveComponent in the replay frame. - [PhoenixReplay.Web.Live.Show](PhoenixReplay.Web.Live.Show.md): Plays back a recording. - [PhoenixReplay.Web.NotFoundError](PhoenixReplay.Web.NotFoundError.md): Raised when a recording does not exist or the viewer may not see it. - [PhoenixReplay.Web.Params](PhoenixReplay.Web.Params.md): Reads values from URL and event params. - [PhoenixReplay.Web.Player.Channel](PhoenixReplay.Web.Player.Channel.md): Messaging between a player and its replay frame. - [PhoenixReplay.Web.Player.Events](PhoenixReplay.Web.Player.Events.md): How the player presents a recording's events: their labels, the kinds the event list filters by, and their timeline markers. - [PhoenixReplay.Web.Player.Journey](PhoenixReplay.Web.Player.Journey.md): The other sessions of a recording's browser tab, for the player's Visit tab: where this one falls among them, and links to the one before and after. Only the sessions the viewer may list are counted. - [PhoenixReplay.Web.Player.Shortcuts](PhoenixReplay.Web.Player.Shortcuts.md): The player's keyboard shortcuts, in one place: the `PlayerKeys` hook reads them to act on keys, and the player shows them in tooltips, menus and the shortcut sheet, so what is shown and what works stay the same. - [PhoenixReplay.Web.Rendering](PhoenixReplay.Web.Rendering.md): Renders recorded views and LiveComponents with recorded assigns. - Internals - [PhoenixReplay.Application](PhoenixReplay.Application.md): Starts PhoenixReplay's supervision tree. - [PhoenixReplay.Storage.Codec](PhoenixReplay.Storage.Codec.md): Binary encoding shared by the storage backends. ## Mix Tasks - [mix phoenix_replay.export](Mix.Tasks.PhoenixReplay.Export.md): Exports a recording as a video, for a bug report or a ticket. - [mix phoenix_replay.list](Mix.Tasks.PhoenixReplay.List.md): Lists recordings, most recent first, as `PhoenixReplay.Trace.find/2` returns them. - [mix phoenix_replay.show](Mix.Tasks.PhoenixReplay.Show.md): Prints a recording's events, or the view at one of them. - Mix Tasks - [mix phoenix_replay.install](Mix.Tasks.PhoenixReplay.Install.md): Install PhoenixReplay in a Phoenix project