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

# Monitor deployments

> Track production performance and errors

Every production request flows through the same observability system you used during development. Dashboards track performance, costs, errors, and quality metrics across your deployed prompts and functions.

## View production metrics

The [**<Icon icon="chart-no-axes-column" /> Dashboards**](https://www.braintrust.dev/app/~/dashboards) page lists the dashboards in a project. Open one to chart how your deployed prompts and functions are performing. For details on creating custom charts, filtering data, selecting timeframes, and building dashboards, see [Dashboards](/docs/observe/dashboards).

Production-specific metrics include:

* **Request count**: Volume of production traffic.
* **Latency**: Response time (total duration, time to first token).
* **Token count**: Prompt tokens, completion tokens, and total usage.
* **Cost**: Estimated spend based on model pricing.
* **Scores**: Quality metrics from online scoring.
* **Tools**: Tool call frequency and success rates.

Filter by production environments, models, or errors to focus on specific segments. Group by model, environment, user, or custom metadata to analyze patterns across your deployments.

## Set up alerts

Configure alerts to notify you by email, Slack, or webhook when metrics exceed thresholds. Create them in **<Icon icon="settings-2" /> Settings** > [**<Icon icon="radio" /> Automations**](https://www.braintrust.dev/app/~/configuration/automations). See [Alerts](/docs/observe/alerts) for the full configuration steps.

<Tip>
  You can also review and create alerts without leaving a dashboard, using the **<Icon icon="bell" /> Alerts** dropdown in its header.
</Tip>

Example alerts:

* Error rate exceeds 5% for 10 minutes.
* Average latency above 2 seconds.
* Daily cost exceeds budget threshold.
* Score drops below 0.8.

## Track costs

Cost charts estimate spending based on model pricing. Costs are calculated from:

* Token counts (prompt, completion, and cache tokens).
* Model pricing rates.
* Provider-specific pricing tiers.

<Note>
  Cost estimates are approximate. Actual billing from providers may vary based on rate limits, batch discounts, and other factors. [Preset cost charts](/docs/observe/dashboards/build-charts) reflect user-facing requests only. Scorer spans generated by Topics and online scoring automations are excluded from these metrics.
</Note>

## Monitor quality

Online scoring automatically evaluates production requests. View score distributions and trends on a dashboard:

* Group by score name to compare different quality metrics.
* Filter by low scores to find problematic requests.
* Track score changes over time to detect quality regressions.

Configure online scoring in **<Icon icon="settings-2" /> Settings** > [**<Icon icon="radio" /> Automations**](https://www.braintrust.dev/app/~/configuration/automations). See [Score online](/docs/evaluate/score-online) for details.

## Query from the CLI

Use the [`bt` CLI](/docs/reference/cli/quickstart) to query production metrics and browse logs without opening the UI.

Browse production traffic interactively with [`bt view logs`](/docs/reference/cli/view):

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
bt view logs                                          # Browse logs for the active project
bt view logs --filter "tags INCLUDES 'production'"    # Filter to production traffic
bt view logs --window 1h                              # Last hour only
```

Run metric queries with [`bt sql`](/docs/reference/cli/sql) for scripting and CI pipelines:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
bt sql "SELECT avg(metrics.latency), count(*) FROM project_logs('my-project') WHERE created > now() - interval 1 hour"
bt sql "SELECT scores.Factuality, count(*) FROM project_logs('my-project') GROUP BY 1 ORDER BY 1"
```

<Tip>
  Most SQL data-source functions also accept an object name in place of its ID. See [Querying by name](/docs/reference/sql/query-structure#querying-by-name).
</Tip>

## Next steps

* [Score online](/docs/evaluate/score-online) to automatically evaluate production requests.
* [Set up alerts](/docs/observe/alerts) to catch issues proactively.
* [View logs](/docs/observe/view-logs) to investigate specific requests.
* [Use dashboards](/docs/observe/dashboards) for detailed observability.
