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

# Metrics

> The GenAI metrics to11 records — names, units, and dimensions — and where you view them.

to11 derives metrics from the GenAI spans it captures for each LLM call: latency, time-to-first-token, token usage, error rate, and finish reasons. These follow the OpenTelemetry GenAI semantic conventions. The names below are the conventional metric names; they also appear if you export your own telemetry alongside what to11 records.

You view aggregate metrics in the to11 dashboard; dashboards over these signals are coming soon. There is no database to query directly. See [Observe](/docs/observe/overview).

## Histogram metrics

| Metric                                   | Unit          | Description                                                                                                                     |
| ---------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `gen_ai.client.operation.duration`       | seconds       | End-to-end latency of each LLM call                                                                                             |
| `gen_ai.client.token.usage`              | tokens        | Token distribution, dimensioned by `gen_ai.token.type` (`input` or `output`)                                                    |
| `gen_ai.server.time_to_first_token`      | seconds       | Time to first token. For streaming, the time to the first content delta; for non-streaming, equal to the total request duration |
| `gen_ai.server.request.duration`         | seconds       | Upstream request duration                                                                                                       |
| `gen_ai.server.time_per_output_token`    | seconds       | Generation time per output token                                                                                                |
| `gen_ai.client.output_tokens_per_second` | tokens/second | Output token throughput                                                                                                         |

<Note>
  These are aggregate metric instruments. The same signals are also recorded as per-request [span attributes](/docs/instrument/span-attributes), and a few carry a different name on spans than as a metric — for example, the throughput metric `gen_ai.client.output_tokens_per_second` is recorded on individual spans as `gen_ai.server.output_tokens_per_second`. The metric and the span attribute are distinct artifacts.
</Note>

## Counter metrics

| Metric                               | Description                                                                                      |
| ------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `gen_ai.client.errors`               | Error count, dimensioned by `error.type`                                                         |
| `gen_ai.client.finish_reasons`       | Finish reason distribution, dimensioned by `gen_ai.response.finish_reason`                       |
| `gen_ai.client.guardrail_violations` | Guardrail hit count, dimensioned by `gen_ai.guardrail.detector` and `gen_ai.guardrail.direction` |

## Dimensions

Metrics carry these dimensions, letting you break signals down by operation, provider, and model:

| Dimension               | Meaning                        |
| ----------------------- | ------------------------------ |
| `gen_ai.operation.name` | Operation type                 |
| `gen_ai.provider.name`  | Provider identity              |
| `gen_ai.request.model`  | Requested model                |
| `gen_ai.response.model` | Response model, when available |

The token usage metric additionally carries `gen_ai.token.type` (`input` or `output`).

## Related

<CardGroup cols={2}>
  <Card title="Span attributes" icon="tag" href="/docs/instrument/span-attributes">
    The attributes recorded on each span.
  </Card>

  <Card title="Observe" icon="activity" href="/docs/observe/overview">
    Where you view your data.
  </Card>
</CardGroup>
