> 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/adding-evidence.md). Agents can also search and read this documentation through its [MCP server](https://docs.flopsar.com/~gitbook/mcp).

# Adding Evidence

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

Evidence comes from two places. **Add to case**, in the views that show recorded data, keeps a copy of what the view shows. **Add entry**, in the investigation itself, adds what the agents did not record: text you type in, or a file.

To add evidence you need to be the owner or an editor of the investigation. See [Sharing](https://docs.flopsar.com/user-guide/observing-and-diagnosing/investigation/sharing.md#roles).

## Add to case

**Add to case** is in the header or the footer of every view that can be kept:

| View                                                                                                                        | Where the button is                         | What is kept                              |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | ----------------------------------------- |
| [Call Stack Details](https://docs.flopsar.com/user-guide/observing-and-diagnosing/method-execution-tree.md)                 | In the header, next to the tabs             | [A call](#a-call)                         |
| [Data Analysis](https://docs.flopsar.com/user-guide/observing-and-diagnosing/data-analysis.md)                              | In the toolbar, after a search              | [An analysis](#an-analysis)               |
| The stack trace of an exception in Data Analysis                                                                            | In the footer of the **Stack Trace** window | [An exception](#an-exception)             |
| [Key-Value](https://docs.flopsar.com/user-guide/observing-and-diagnosing/metrics.md)                                        | Above the chart, after a search             | [A Key-Value series](#a-key-value-series) |
| Thread dump of an instance ([Agents](https://docs.flopsar.com/user-guide/setting-up-monitoring/agents.md#instance-details)) | In the header of the thread dump            | [A thread dump](#a-thread-dump)           |
| [Correlated calls](https://docs.flopsar.com/user-guide/observing-and-diagnosing/data-correlation.md)                        | In the header of the window                 | [A correlation](#a-correlation)           |

<figure><img src="https://1957839935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQzShZISPoFZ9zIHUdjNB%2Fuploads%2Fgit-blob-0ce9bc7738e21ca63d5e119975d151551eaf7178%2Finvestigation_add_to_case.png?alt=media" alt="The Add to case button in the toolbar of Data Analysis, with the tooltip: Keep a copy of this analysis in INC-2381 Customer cannot sign in. The server runs the analysis again and keeps its result"><figcaption><p>The tooltip names the investigation the copy goes to.</p></figcaption></figure>

Hover over the button to see where the copy goes and what the server does, for example *Keep a copy of this analysis in INC-2381 Customer cannot sign in. The server runs the analysis again and keeps its result*.

What happens when you select it:

* **With an active investigation**, the copy is added to it right away. A message *Added to the investigation* confirms it, and the count in the top bar grows by one.
* **Without an active investigation**, a menu opens. **Recent investigations** lists up to five investigations you can add to, most recently changed first; the ones of other users show the owner in parentheses. Select one to add the copy to it and make it the active one. **New investigation…** asks for a name and creates the investigation with the copy as its first evidence (**Create and add**).

To add to another investigation than the active one, switch the active investigation in the top bar first. See [The active investigation](https://docs.flopsar.com/user-guide/observing-and-diagnosing/investigation/managing-investigations.md#the-active-investigation).

The button is not shown without the **View parameters** permission. In Call Stack Details it is replaced by the **Evidence copy** badge when the call you look at is already a copy, opened from an investigation.

### The server makes the copy

**Add to case** does not send what your browser shows. It sends what identifies the data (the call, the query, the key and the period, the instance) and the server reads or runs it again, then keeps the result. So:

* the copy is what the stored data said at that moment, and nobody can put something else in it from the browser;
* the copy follows the same rules as the view: your permissions, the applications your role allows, and [Data Masking](https://docs.flopsar.com/user-guide/setting-up-monitoring/data-masking.md), which was applied when the data was stored;
* for a query, such as an analysis, the copy can contain calls recorded after you ran the query in the view, if the period was not over yet.

Every copy is checked against the limits of the investigation: up to 200 items, 8 MB per item, 64 MB for all items together.

## What each kind keeps

Each item gets a title, a time and an application that the server works out. You can change the title and add a note afterwards; see [Editing the title and the note](https://docs.flopsar.com/user-guide/observing-and-diagnosing/investigation/reviewing-evidence.md#editing-the-title-and-the-note).

### A call

From Call Stack Details of any call, opened from the Data Browser, Data Correlation, or a correlated row.

* **Kept:** the whole call stack, every call with its timing, and the parameters and exception stack traces of every call in it, including nested ones. Nested parameter and exception records are read for up to 5,000 calls of one stack. Records that were no longer stored at that moment are counted, and the count is shown on the copy.
* **Title:** the class and method of the root call, followed by the URL when one was captured, for example `CharacterEncodingFilter.doFilter /konakart/LoginSubmit.action`.
* **Time:** the start of the call.
* **Fails** with *the call is no longer stored* when it has passed out of retention.

### An analysis

From Data Analysis after a search.

* **Kept:** the result of the query as Data Analysis computes it: the number of calls, exceptions and business errors, the average and the longest duration, calls over the period, duration by percentiles, the instances, the exceptions with the methods that threw them most often, and the business errors by rule. The query itself is kept too, so that it can be [replayed](https://docs.flopsar.com/user-guide/observing-and-diagnosing/investigation/replay.md) or opened again.
* **Title:** `Analysis of <application>`, followed by the conditions of the query when there are any.
* **Time:** the period of the query.

### An exception

In Data Analysis, select an exception in **Top root exceptions**, open its stack trace, and select **Add to case** in the footer of the **Stack Trace** window.

* **Kept:** the class, the stack trace you are looking at, how many times the analysis found it, and the methods that threw it most often. The analysis that found it is kept with it.
* **Title:** the simple name of the class and the application, for example `KKException in konakart`.
* **Time:** the period of the analysis.
* **Fails** with *the analysis did not find this exception* when the analysis is run again and the exception is not in it, and with *the stack trace is no longer stored* when the trace has passed out of retention.

### A Key-Value series

From Key-Value after a search, for the key on the chart.

* **Kept:** every value of the key in the period, for each instance of the application. The server reads the values of the period again.
* **Title:** `<key> in <application>`, for example `JVM/memory/heap/used in konakart`.
* **Time:** the period of the search.
* **Fails** with *no values of this key in the period* when nothing was recorded.

### A thread dump

Open the instance in **Instances**, select **Options → Threads dump**, and select **Add to case** in the header of the dump.

* **Kept:** a **new** thread dump. The server asks the agent for a dump at that moment, so the copy can differ from the one on the screen. It waits up to 30 seconds.
* **Title:** `Thread dump of <instance> on <host> (pid <pid>)`.
* **Time:** when the dump was taken.
* **Needs** the **Query agents** permission and a connected agent. It fails with *the agent did not send the thread dump in time* after 30 seconds. The request to the agent is recorded in the audit trail as `agent_execute`, like any other live query.

### A correlation

In the Correlated calls window, after setting the options, select **Add to case** in its header.

* **Kept:** the root calls that carried the same parameter value, with the current settings of the window (key and value or value only, applications, time window): for each call the start, application, instance, method, duration, exceptions, and the parameter that matched, up to 200 calls. The call you started from is marked. Calls of applications you may not see are left out and counted.
* **Title:** `Calls correlated by <key> in <application>`, or `across N applications`; `by a parameter value` with **Value only**. The title names the key, never the value.
* **Time:** from the start of the first call found to the end of the last one.
* **Fails** with *no calls carry this parameter value in the period*.

The server runs the search again, so it is recorded in the audit trail as a search by parameter value (`sensitive_data_view`), like the search in the window.

## Adding an entry

Some evidence is not in the recorded data: what the customer said on the phone, what another team found, a decision. Record it as an **entry**: select **Add entry** in the header of the evidence list.

<figure><img src="https://1957839935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQzShZISPoFZ9zIHUdjNB%2Fuploads%2Fgit-blob-896fcfe7dc992754fa9b063f5d117190c896a569%2Finvestigation_add_entry.png?alt=media" alt="The Add Entry dialog in Text mode: the title Customer reported failed sign-in (ticket INC-2381), the time, the application konakart, and what the customer reported"><figcaption><p>An entry records what the customer reported, at the time it was reported.</p></figcaption></figure>

* **Text** / **File**: select **Text**.
* **Title**: what the entry is, up to 200 characters. Required.
* **When it happened**: the moment the entry is about, not the moment you add it. It is now by default and cannot be in the future. The entry is placed in the evidence list and in the report timeline at this time.
* **Application (optional)**: the application it concerns, so that it is grouped with its evidence in the report.
* **What happened**: the text, up to 20,000 characters. Required. *The text is kept as written; only the title and the note can be changed later.*

Select **Add**. The entry is marked **Entry** with an amber badge, with the tooltip *Typed in by hand, not recorded by an agent*, here and in the report.

## Adding a file

Screenshots, log excerpts, an e-mail exported as PDF: select **Add entry**, then **File**.

<figure><img src="https://1957839935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQzShZISPoFZ9zIHUdjNB%2Fuploads%2Fgit-blob-a4633125aa5388cf255d548e4cba74a92960266b%2Finvestigation_add_file.png?alt=media" alt="The Add Entry dialog in File mode with konakart-auth.log of 352 B selected, the title Shop log excerpt, the time, the application, a note, and the warning that Data Masking does not apply to the file"><figcaption><p>A log excerpt added as a file, with a note on where it came from.</p></figcaption></figure>

* **File**: drop the file on the field, or select it to choose one. Up to 8 MB.
* **Title (optional)**: the name of the file when left empty.
* **When it happened**: the moment the file shows, for example the time of the screenshot.
* **Application (optional)**.
* **Note (optional)**: where the file came from and what it shows, up to 2,000 characters.

{% hint style="warning" %}
The file is kept as it is: Data Masking does not apply to it. Remove personal data, passwords and tokens from screenshots and logs before adding them.
{% endhint %}

The server judges the type of the file by its content, not by its name. It recognises PNG, JPEG, GIF and WebP pictures, PDF, ZIP and gzip files, and plain text; anything else is kept as binary data. Pictures and text can be previewed in the investigation; every file can be downloaded as it was added. See [Opening an attachment](https://docs.flopsar.com/user-guide/observing-and-diagnosing/investigation/reviewing-evidence.md#an-attachment).

The file is marked **Attachment** with an amber badge and the tooltip *A file added by hand, not recorded by an agent*. In the [report](https://docs.flopsar.com/user-guide/observing-and-diagnosing/investigation/report.md), pictures are drawn and every file is attached to the PDF.

## Keeping a replayed result

[Replay](https://docs.flopsar.com/user-guide/observing-and-diagnosing/investigation/replay.md) runs the queries behind the evidence in another period. Its results are not kept unless you select **Add to case** next to one. The server runs the query again for the copy and adds it as a new item, titled like the original with the shift added, for example `Analysis of konakart (1 day earlier)`, and with the note `Replay of E1 1 day earlier.` A replayed analysis or Key-Value series is kept as the same kind, a replayed correlation as a correlation, and a replayed call or exception as the analysis it was compared with.

## What a copy contains

Know what you keep before you add it:

* A call keeps the **captured parameters** of every call in its stack. Masked values stay masked, but values that are not masked, such as logins, order numbers or e-mail addresses, are in the copy. Exception messages are not masked.
* An entry or a file keeps exactly what you typed in or added.
* Copies are not removed by retention. They stay until the item or the investigation is deleted.

Add only what the case needs, and delete the investigation when the case is closed and the time your data protection rules allow has passed. See [Forensic Investigations](https://docs.flopsar.com/user-guide/forensic-investigations.md#keeping-evidence).

## When adding fails

The message says why. The most common reasons:

| Message                                                                                    | What to do                                                                                                      |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
| *an investigation can hold at most 200 evidence items*                                     | Delete items the case does not need, or start a second investigation.                                           |
| *the evidence of an investigation can take at most 64 MB*                                  | Delete large items; the size of each one is shown in the list.                                                  |
| *the call takes N MB, more than the 8 MB an evidence item can hold*                        | The call stack is too large to keep. Keep an analysis of its period instead, and describe the call in an entry. |
| *the file takes N MB, more than the 8 MB an evidence item can hold*                        | Cut the log or scale the screenshot down.                                                                       |
| *the call is no longer stored*, *the stack trace is no longer stored*                      | The data has passed out of retention; it cannot be kept any more.                                               |
| *no values of this key in the period*, *no calls carry this parameter value in the period* | Nothing was found to keep; check the period.                                                                    |
| *the agent did not send the thread dump in time*                                           | The agent is busy or disconnected; try again.                                                                   |
| *you may not change this investigation*                                                    | You are a viewer, or no longer a member. Ask the owner.                                                         |
