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

# Monitoring

> Track AI usage, performance, and errors with SDK integration and tracing.

Monitoring gives you full visibility into your production AI system. Integrate the `@know-your-ai` SDK to automatically capture every AI interaction and surface it in dashboards and traces.

## SDK integration

Add the `@know-your-ai` SDK to your application to start capturing events.

1. Install the SDK package
2. Configure your **DSN** (Data Source Name) from the product settings
3. The SDK automatically captures: provider, model, token usage, cost, latency, errors, and trace/span data

## Monitoring dashboard

The monitoring dashboard aggregates SDK events with key metrics:

* **Total requests** — Count of AI interactions over time
* **Error count** — Failed requests and error rates
* **Average duration** — Response time metrics
* **Token usage** — Input, output, and cached tokens
* **Cost tracking** — Estimated cost per interaction
* **Latency breakdown** — TTFB, throughput, p95 percentiles
* **Provider distribution** — Usage split by AI provider
* **Model distribution** — Usage split by model version

## Tracing

The tracing view provides a full span-tree visualization for debugging AI interactions.

**Supported span types:**

| Span type  | Description                |
| ---------- | -------------------------- |
| Generation | LLM call with input/output |
| Agent      | Agent orchestration step   |
| Tool       | Tool/function call         |
| Chain      | Chained processing step    |
| Retriever  | RAG retrieval step         |
| Evaluator  | Evaluation judgment        |
| Guardrail  | Safety/content filter      |
| Event      | Custom event               |

Each span includes:

* Trace, session, and user context
* Input/output data
* Tool calls and errors
* Duration and timing
* Filterable by status, model, and time range

## Token usage charts

Track token usage over time with configurable views:

* Input tokens, output tokens, and total
* Configurable granularity: hour, day, month
* Time ranges: 24 hours, 7 days, 30 days, 90 days
* Server response time charts

## Related docs

<CardGroup cols={2}>
  <Card title="Evaluation" icon="check-double" href="/evaluation">
    Build the signals you monitor in production.
  </Card>

  <Card title="Workspace" icon="folder" href="/workspace">
    Keep environments isolated and clean.
  </Card>
</CardGroup>
