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

# Observability

> Observers for debugging, evaluation harness for CI, pre-flight provider health checks.

Observability examples enact what you'd add to a production deployment. Sources under [`examples/observability/`](https://github.com/0xvasanth/cognis/tree/main/examples/observability).

| Name                    | Scenario                                                                                                | Source                                                                                              |
| ----------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `obs_event_system`      | Add lightweight LLM-call timing logs without changing the chain code — attach a `TimedLogger` Observer. | [src](https://github.com/0xvasanth/cognis/blob/main/examples/observability/event_system_demo.rs)    |
| `obs_evaluation`        | Regression eval — given 5 known (question, expected\_answer) pairs, score the agent. Run in CI.         | [src](https://github.com/0xvasanth/cognis/blob/main/examples/observability/evaluation_framework.rs) |
| `obs_health_monitoring` | Pre-flight provider check — verify the LLM is reachable at startup; fail fast with a clear error.       | [src](https://github.com/0xvasanth/cognis/blob/main/examples/observability/health_monitoring.rs)    |

## How to run

```bash theme={null}
COGNIS_PROVIDER=ollama COGNIS_OLLAMA_MODEL=llama3.1 \
  cargo run -p cognis-examples --example obs_evaluation
```

## See also

<CardGroup cols={2}>
  <Card title="Callbacks & observers" icon="bolt" href="/observability/callbacks">
    The user guide.
  </Card>

  <Card title="Trace with Langfuse" icon="chart-line" href="/observability/langfuse">
    Production observability.
  </Card>

  <Card title="Evaluation" icon="check" href="/observability/evaluation">
    Datasets, scorers, reports.
  </Card>
</CardGroup>
