> For the complete documentation index, see [llms.txt](https://docs.flopsar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flopsar.com/user-guide/observing-and-diagnosing/investigation/replay.md). Agents can also search and read this documentation through its [MCP server](https://docs.flopsar.com/~gitbook/mcp).

# Replay

{% hint style="info" %}
Available since Flopsar **7.2**.
{% endhint %}

Evidence shows what happened during the incident. Whether that was unusual is another question: 130 exceptions in a quarter of an hour may be a failure, or what the application always does. **Replay** answers it. It runs the queries behind the evidence again with every period moved, for example a day or a week earlier, and puts the results side by side with what the evidence shows.

Nothing is kept unless you add it. Replay reads the data still stored, with your permissions.

## Running a replay

Select **Replay** in the header of the evidence list. It is there when at least one item shown can be replayed. If a filter is set, only the items shown are replayed; the dialog says how many more are hidden by the filters.

<figure><img src="https://1957839935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQzShZISPoFZ9zIHUdjNB%2Fuploads%2Fgit-blob-e3d512ad3cb157e31b90dfbd4c0ff1bd20abe5ac%2Finvestigation_replay.png?alt=media" alt="The Replay Evidence dialog with 1 day earlier selected: a Key-Value series, an analysis, an exception and a call, each with the period of the evidence, the replayed period, the measures side by side with the change, and Add to case"><figcaption><p>The evidence of 7 November replayed on 6 November: far fewer calls and exceptions on a normal day.</p></figcaption></figure>

1. Under **Move every period**, choose how far: **4 weeks earlier**, **1 week earlier** (the default), **1 day earlier**, **1 day later**, **1 week later**, or **Custom**.
2. For **Custom**, set **The earliest evidence starts at** to the moment the earliest item should start at. Every other item moves by the same amount, so the order and the gaps between them stay the same. The shift can be up to 400 days, earlier or later.
3. Select **Replay**.

The line under the choices says what will run, for example *1 day earlier. 5 of 8 evidence items can be replayed; thread dumps, entries and files cannot. A call is compared with the calls of its method half an hour around it. The analyses run with your permissions, on the data still stored.*

The items run one after another. Each says *Waiting…*, then *Running the query…*, then shows its result or the error. **Stop** finishes the item that is running and skips the rest. Closing the dialog stops it too.

A replay reads a lot of data, so the server runs at most four at a time for all users; the others wait.

## What is compared

| Kind                           | Replayed                                                                                                   | Compared                                                                                                                                                                                           |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Analysis                       | The same query, with the same conditions, in the moved period                                              | Calls, average, median, 95th and 99th percentile, longest, exceptions, business errors when there are any, and each of the most common exception classes and business error rules (up to ten each) |
| Exception                      | The analysis that found it, in the moved period                                                            | How many times the same class was thrown                                                                                                                                                           |
| Call                           | All calls of the same method, half an hour before and after the call, and the same around the moved moment | Calls, average, median, 95th and 99th percentile, longest, exceptions, business errors                                                                                                             |
| Key-Value                      | The same key of the same application in the moved period                                                   | Number of values, minimum, average, maximum                                                                                                                                                        |
| Correlation                    | The same search for the same value, with the same settings, in the moved period                            | The number of calls with the value                                                                                                                                                                 |
| Thread dump, Entry, Attachment | Cannot be replayed                                                                                         |                                                                                                                                                                                                    |

A call cannot be replayed on its own, because it happened once. Instead, Replay shows how the method behaved around it, and how it behaved around the same moment of the other period. The result starts with *This call took 37.8 ms; below, all calls of CharacterEncodingFilter.doFilter around it and around the replayed moment.*, and *with an error* when the call failed.

## Reading the result

Each item shows its number, kind and title, then the periods: the period of the evidence `→` the replayed period. **not over yet** marks a replayed period that has not ended, so its numbers are not complete. For an analysis the conditions of the query follow; for a correlation the key it searches by, or *by any parameter*.

The table has three columns of values:

* **Evidence** (**Around the call** for a call): what the evidence period shows. For an analysis this is the query run again on the evidence period, so it can include calls recorded after the copy was kept.
* **Replayed**: the same in the moved period.
* **Change**: from the evidence to the replayed period, as a percentage, such as `+35%` or `−50%`; `new` when the measure was zero in the evidence period, `gone` when it is zero in the replayed one, `same` when the change is below 1%.

The change is coloured for measures where more is worse, such as durations and exceptions: red when the replayed period is worse, green when it is better. Counts of calls and Key-Value values are not coloured, because more of them is neither good nor bad.

*no calls* means that no call matched in that period, and *not in top* that an exception or a rule was not among the most common ones of that period, so its count is not known. Notes under the table explain the most common cases:

* *No calls in the replayed period: nothing ran, or the data is no longer stored.*
* *In the replayed period the exception is not among the ten most common ones of the analysis, so its count is not known.*
* *Nothing in the replayed period carries the value; a value like an order number seldom recurs.*

In the example above, the day before the incident had 93 calls instead of 926, and one KKException instead of 130. The exceptions are not what the application does every day, so the findings should explain them.

## Keeping a result

Select **Add to case** next to a result to keep it as new evidence. The server runs the query again for the copy, so what is kept is what the data says at that moment. The item is titled like the original, with the shift, for example `Analysis of konakart (1 day earlier)`, and has the note `Replay of E1 1 day earlier.` After it has been added, the button is replaced by **added**.

A replayed analysis, Key-Value series or correlation is kept as the same kind. A replayed exception or call is kept as the analysis it was compared with.

**Add to case** is there for the owner and editors, and only for results that found something.

## Permissions and audit

Anyone who can open the investigation can replay its evidence. Replays run with the permissions of the person who runs them: evidence of applications their role excludes is not replayed, and calls of those applications are left out of a replayed correlation.

Each replayed item is recorded in the audit trail as `evidence_view`, with the replayed period. A replayed correlation is a search by parameter value, so it is also recorded as `sensitive_data_view`.
