> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperprobe.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Probe Types & Instrumentation Catalog

> Understand, configure, and compare the four dynamic probe types available inside HyperProbe.

HyperProbe supports four specialized, ultra-lightweight probe types. Each probe is optimized for a different stage of production debugging and telemetry tracking.

***

## ⚡ Comparison of Probe Capabilities

| Probe Type        | What it captures                                    | CPU Overhead       | Memory Overhead | Payload Size | Best for                                                                   |
| :---------------- | :-------------------------------------------------- | :----------------- | :-------------- | :----------- | :------------------------------------------------------------------------- |
| **Snapshot**      | Local variables, watch expressions, full call stack | Low (microseconds) | Low             | \~50KB-500KB | Inspecting complex state bugs, null-pointer exceptions, payload structures |
| **Dynamic Log**   | Formatted string with interpolated runtime values   | Very Low           | Very Low        | Low (\< 1KB) | Adding telemetry on-the-fly, checking thread execution, debugging routing  |
| **Counter**       | Numeric hit increment                               | Negligible         | None            | Raw Integer  | Tracking hot paths (loops, cache misses) without log spam                  |
| **Custom Metric** | Evaluated float value of any expression             | Negligible         | None            | Raw Float    | Tracking latency ratios, queue depths, pool capacities                     |

***

## 📸 1. Snapshot Probes

Snapshot probes act like standard breakpoints in local debugging, but they **never pause execution threads**. When hit, the agent grabs the active scope variables and the call stack frames, then instantly resumes control.

### How to Configure Snapshots

* **Hit Limit (Default `1`):** Limits how many snapshots are taken before the probe automatically uninstalls itself in-process. snapshots default to `1` to avoid heap copies.
* **Watch Expressions:** Enter custom evaluations (e.g. `user.profile.isAdmin`) to track deep nested values without serializing entire root objects.
* **Condition:** Filter the execution. Only captures when a boolean evaluation is met (e.g., `cart.total > 5000`).

***

## 📝 2. Dynamic Log Probes

Dynamic Log probes let you write log lines with interpolated variables (`${expression}`) and inject them into stdout/stderr without redeploying.

### message Formatting Syntax

Wrap runtime variables in standard string interpolation templates:

```text theme={null}
Processing purchase for user: ${user.id} | Items in cart: ${cart.items.length}
```

### Supported Log Levels

* `INFO` - Standard operational traces.
* `WARN` - Unexpected but non-fatal conditions.
* `ERROR` - Critical failures and exceptions.
* `DEBUG` - High-detail engineering diagnostics.

***

## 🔢 3. Counter Probes

Counter probes are extremely lightweight. Instead of collecting strings or variable trees, they increment a running atomic counter in-process and stream the frequency of execution back to your editor.

### Key Use Cases

* Measuring branch execution (e.g., how often is the `else` block running versus the `if` block?).
* Tracking cache misses inside database queries.
* Measuring high-frequency loops (perfectly safe for paths executing millions of times per second).

***

## 📈 4. Custom Metrics Probes

Metric probes evaluate any mathematical or numerical expression and export the float result directly to your editor or metric dashboard.

### Example Expressions

```text theme={null}
databasePool.activeConnections
(endTime - startTime) / 1000
user.orders.count
```

### Conditionals & Hit Limits

Because metrics and counters generate minimal network payloads, their default hit limits can be scaled much higher (up to `10,000` hits) than Snapshots to build high-fidelity frequency charts.
