/ops/projections) lets operators rebuild derived state by reprocessing events from ClickHouse through one or more projections. This is the primary tool for recovering from projection bugs, backfilling new projections, or rebuilding state after a data migration.

How Replay Works
LangWatch uses event sourcing: every state change is stored as an immutable event in ClickHouse. Projections are functions that fold events into derived state (e.g., analytics aggregations, trace summaries). When a projection has a bug or needs to be rebuilt, replay reprocesses the raw events. A full replay follows four phases:- Pause — Freeze the selected projections so new events don’t interfere
- Drain — Wait for in-flight jobs to complete
- Replay — Reread events from ClickHouse and reprocess them through the projections
- Unpause — Resume normal processing
Bulk Replay Wizard
The main interface is a three-step wizard:Step 1: Select Tenants
Choose which tenants (projects) to replay:- Select individual tenants from a searchable multi-select
- Or check “All tenants” to replay across the entire platform
Step 2: Choose Date Range
Set the “Replay events since” date — only events after this date are reprocessed. Quick-select buttons are available for common ranges (1, 2, 3, or 6 months). Once tenants and date are selected, the system automatically discovers aggregates — querying ClickHouse to find how many aggregates match each projection.Step 3: Select Projections
A table shows all available projections with:- Projection name and pipeline
- Aggregate count — how many aggregates have data in the selected range
- Projections with no matching data are disabled
Review & Start
Before starting, a summary shows:- Total aggregates, projections, and tenants selected
- A description field for audit logging
- Start Full Replay — runs the four-phase replay process
- Dry Run — processes 5 sample aggregates in memory without writing, to verify the projection logic is correct
Monitoring Progress
When a replay starts, a progress drawer slides open showing real-time metrics:- Current phase (pause, drain, replay, unpause)
- Current projection being processed
- Aggregates processed — progress bar with count and percentage
- Events processed — total events replayed
- Throughput — events per second
- Elapsed time — wall clock since start
- Projection badges — highlighting the currently active projection
Replay History
Below the wizard, a history table shows all past replay runs with:| Column | Description |
|---|---|
| Status | Running, completed, failed, or cancelled |
| Description | User-provided description |
| Projections | Number of projections replayed |
| Duration | Total wall-clock time |
| Aggregates | Total aggregates processed |
| Events | Total events replayed |
| When | Start timestamp |
/ops/projections/{runId}).
Single Aggregate Replay
For debugging, an Advanced section (collapsed by default) allows replaying a specific aggregate:- Enter the Aggregate ID (e.g.,
trace_abc123) - Enter the Tenant ID
- Select which projections to replay
- Click “Replay Single”
Common Workflows
Backfilling a new projection
- Deploy the new projection code
- Open Projection Replay → select “All tenants”
- Set the date range to cover all relevant history
- Select only the new projection
- Start a Dry Run first to verify correctness
- If the dry run looks good, Start Full Replay
Fixing a projection bug
- Deploy the fix
- Select the affected projection(s)
- Set the date to when the bug was introduced (or earlier to be safe)
- Select affected tenants (or all)
- Start replay — the fixed projection code reprocesses all events
Debugging a single trace
- Expand the Advanced: Single Aggregate Replay section
- Enter the aggregate ID and tenant ID
- Select the projection you’re investigating
- Replay — then check Deja View to inspect the result