# Setting Up Monitoring

Before you can analyze anything in Flopsar, you decide **what to observe**. This section walks through that setup, from getting an agent connected to shaping exactly which method executions are captured and ensuring sensitive values are protected.&#x20;

Unlike tools that force you to predict in advance which metrics you will need, Flopsar lets you choose what to instrument and adjust it as you learn — often **at runtime**, without changing your application's source code.

## The setup workflow

A typical path from "nothing configured" to "useful data" looks like this:

```mermaid
flowchart LR
    A["1. Connect an agent"] --> B["2. Create a profile"]
    B --> C["3. Choose instrumentation"]
    C --> D["4. Classify with filters & services"]
    D --> E["5. Protect data with masking"]
    E --> F["Analyze in the Workstation"]
```

1. Connect an agent. An agent runs inside your JVM and reports under an application identity. Confirm it is connected and healthy in the [Agents](vscode-file://vscode-app/user-guide/agents) view. (Provisioning the agent's key and deploying the agent itself are administrator tasks; see [Installation](vscode-file://vscode-app/installation/agent) and [Authentication, Authorization & Identity](vscode-file://vscode-app/admin/identity/authentication).)
2. Create a profile. A [profile](vscode-file://vscode-app/user-guide/profiles) is the named set of monitoring rules for an application — the container for everything you decide to observe.
3. Choose instrumentation. Within the profile, select the classes and methods to watch and whether to capture parameters. See [Instrumentation](vscode-file://vscode-app/user-guide/instrumentation). You can refine this as you narrow down a problem.
4. Classify with filters and services. Use [Filters & Services](vscode-file://vscode-app/user-guide/filters-and-services) to group meaningful entry points and focus on the executions that matter.
5. Protect sensitive data. Configure [Data Masking](vscode-file://vscode-app/user-guide/data-masking) so that values matching your patterns are redacted before they are stored.

Once data is flowing, move on to [Observing & Diagnosing](vscode-file://vscode-app/user-guide/live-view) to put it to work.

## Choosing what to instrument

Instrumentation is a balance:

* Too little, and the execution stack is shallow and gaps hide the cause (remember that what you see is an [assembled stack](vscode-file://vscode-app/user-guide/concepts#assembled-stacks-why-what-you-see-can-differ-from-reality)).
* Too much, and you add overhead and capture noise.

A practical approach is to start broad at the entry points you care about, look at the resulting execution stacks, and then drill in — adding instrumentation to the methods that turn out to be interesting. Because changes can be applied dynamically, this iterative loop is fast.

## Roles and permissions

Setting up monitoring requires the appropriate permissions (for example, to view agents, and to view, edit, and deploy profiles). If an action is unavailable to you, your role may not grant it; see [Authentication, Authorization & Identity](vscode-file://vscode-app/admin/identity/authentication). All profile, instrumentation, masking, and filter changes are recorded in the [audit trail](vscode-file://vscode-app/security/audit-logging).

## A note on overhead and safety

Because the agent runs inside your application, instrumentation has a cost and, in the extreme, can affect application behavior. Prefer to validate significant instrumentation changes in a non-production environment first, scope changes to what you need, and watch application overhead after applying them. See [Known Risks & Limitations](vscode-file://vscode-app/security/known-risks).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flopsar.com/7/user-guide/setting-up-monitoring.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
