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

# Observability

> Trace Fleet RLM Turns with MLflow, record feedback, keep local Runtime Event captures, and configure PostHog analytics.

Fleet RLM has three observability channels. None of them can change execution or committed state.

| Channel | Configured in | Holds |
| - | - | - |
| MLflow tracing | `[mlflow]` | DSPy autolog traces for engineering debugging. |
| Runtime Event captures | `[capture]` | One local JSONL file per Run. |
| PostHog analytics | `[posthog]` | Product events such as `session_created` and `turn_failed`. |

## MLflow tracing

The shipped configuration enables tracing against a local MLflow server at `http://127.0.0.1:5001`.

```toml config/fleet.toml theme={null}
[mlflow]
tracing_enabled = true
tracking_uri = "http://127.0.0.1:5001"
experiment_name = "fleet-rlm"
experiment_purpose = "runtime"
expose_trace_id = true
```

When the tracking URI is that local address, `fleet cli` starts an MLflow server for you. It stores data in `.fleet_rlm/mlflow/mlflow.db` and fails if a server already on that port runs a different MLflow version than the pinned one.

To trace to Databricks, set `tracking_uri = "databricks"`, authenticate with `DATABRICKS_HOST` and `DATABRICKS_TOKEN`, and set the optional trace destination keys: `trace_catalog`, `trace_schema`, `trace_table_prefix`, and `tracing_sql_warehouse_id`.

### Find a trace

With `expose_trace_id = true`, `turn_start` and `turn_finish` carry a `traceId`. In the terminal, run `/trace` to print the trace ID and Run ID.

### Control trace content

| Key | Shipped value | Description |
| - | - | - |
| `trace_sampling_ratio` | `1.0` | Fraction of Turns to trace. |
| `trace_content_enabled` | `true` | Allow bounded, sanitized content in traces. |
| `trace_content_max_chars` | `10000` | Maximum characters in one trace payload field. |
| `async_logging` | `true` | Upload trace data asynchronously. |

## Record feedback

Attach a thumbs-up or thumbs-down to a trace from the terminal:

```text theme={null}
/feedback up Clear and correct
```

Or over HTTP:

```bash theme={null}
curl -X POST http://127.0.0.1:8000/api/sessions/<session-id>/traces/feedback \
  -H 'Content-Type: application/json' \
  -d '{"trace_id": "<trace-id>", "value": true, "comment": "Clear and correct"}'
```

`comment` is optional and limited to 2,000 characters.

## Runtime Event captures

Fleet writes one capture file per Run at `<data_root>/captures/<session_id>/<run_id>.jsonl`, so a Turn's streamed events survive a client disconnect.

```toml config/fleet.toml theme={null}
[capture]
enabled = true
retention_days = 14
max_captures = 500
```

Fleet deletes captures older than `retention_days`, then keeps only the newest `max_captures`.

## PostHog analytics

Set `posthog.enabled = true` and put the project token in the variable named by `posthog.project_token_env`. The shipped configuration uses `POSTHOG_PROJECT_TOKEN` and the EU host `https://eu.i.posthog.com`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.