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

# Metrics

> The metrics available for monitoring Maestro agents.

Rasa records OpenTelemetry metrics for monitoring conversations. This page
describes each metric, when Rasa records it, and what its dimensions mean.

## Configure metrics

Create an `endpoints.yml` file in your project and add a `metrics` section:

```yaml theme={null}
metrics:
  type: otlp
  endpoint: <your-otel-collector-endpoint>
  insecure: true
```

Replace the endpoint with your OpenTelemetry collector's gRPC endpoint. Metrics
can be enabled without configuring tracing.

## Voice metrics

Voice metrics cover calls handled through streaming voice channels.

### `rasa.voice.call.duration`

Records the time from the start of a streaming voice call until the call ends.
Rasa records it once at the end of the call, so ongoing calls are not included.

Use it to compare call durations and outcomes.

| Detail               | Value                                                                      |
| -------------------- | -------------------------------------------------------------------------- |
| Kind                 | Histogram                                                                  |
| Unit                 | Seconds (`s`)                                                              |
| Histogram boundaries | `5`, `15`, `30`, `60`, `120`, `300`, `600`, `1200`, `1800`, `2700`, `3600` |

**Dimensions**

| Dimension            | Type   | Required | Values                                                                                                                                                                                                                                            |
| -------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rasa.voice.outcome` | string | Yes      | `completed` — the call ended normally, at the agent's request, or while Rasa was shutting down; cancellation is not a separate outcome<br /><br />`disconnected` — the connection dropped<br /><br />`failed` — an unhandled error ended the call |

### `rasa.voice.tts.time_to_first_audio`

Records the time to the first audio chunk for one agent message. For a cache
hit, timing starts when Rasa finds the cached audio. For a cache miss, it starts
when Rasa sends the request to the TTS provider. The metric is not recorded if
no audio is produced or TTS fails, even if fallback audio plays after the
failure. In that case, the
`voice.latency.tts_first_byte_ms` span attribute can still measure the fallback
audio when tracing is enabled.

Use it to compare time to first audio by provider and cache status.

| Detail               | Value                                                                               |
| -------------------- | ----------------------------------------------------------------------------------- |
| Kind                 | Histogram                                                                           |
| Unit                 | Seconds (`s`)                                                                       |
| Histogram boundaries | `0.005`, `0.01`, `0.025`, `0.05`, `0.1`, `0.25`, `0.5`, `1`, `2.5`, `5`, `10`, `30` |

**Dimensions**

| Dimension                  | Type    | Required | Values                       |
| -------------------------- | ------- | -------- | ---------------------------- |
| `rasa.voice.provider`      | string  | No       | TTS provider name; free-form |
| `rasa.voice.tts.cache_hit` | boolean | No       | `true` / `false`             |

### `rasa.voice.tts.synthesis.duration`

Records the time to complete TTS for one agent message. For a cache hit, timing
starts when Rasa finds the cached audio and ends when cached-audio delivery
completes. For a cache miss, it starts when Rasa sends the provider request and
ends when audio generation completes. On failure, timing stops at the first
failure and excludes fallback audio. If TTS neither completes nor fails, no
measurement is recorded.

Use it to compare TTS completion times by outcome, provider, and cache status.

| Detail               | Value                                                                               |
| -------------------- | ----------------------------------------------------------------------------------- |
| Kind                 | Histogram                                                                           |
| Unit                 | Seconds (`s`)                                                                       |
| Histogram boundaries | `0.005`, `0.01`, `0.025`, `0.05`, `0.1`, `0.25`, `0.5`, `1`, `2.5`, `5`, `10`, `30` |

**Dimensions**

| Dimension                  | Type    | Required | Values                         |
| -------------------------- | ------- | -------- | ------------------------------ |
| `rasa.voice.outcome`       | string  | Yes      | `completed`<br /><br />`error` |
| `rasa.voice.provider`      | string  | No       | TTS provider name; free-form   |
| `rasa.voice.tts.cache_hit` | boolean | No       | `true` / `false`               |

### `rasa.voice.playback.duration`

Records the time from the first delivered audio chunk until playback completes,
is interrupted, is cancelled, or fails. Rasa records it only after at least one
audio chunk is delivered. If playback ends before delivering audio, this metric
is not recorded, but `rasa.voice.operation.failures` can still count an
unexpected failure.

Use it to compare playback times by outcome.

| Detail               | Value                                                                |
| -------------------- | -------------------------------------------------------------------- |
| Kind                 | Histogram                                                            |
| Unit                 | Seconds (`s`)                                                        |
| Histogram boundaries | `0.25`, `0.5`, `1`, `2.5`, `5`, `10`, `20`, `30`, `60`, `120`, `300` |

**Dimensions**

| Dimension            | Type   | Required | Values                                                                                                                                             |
| -------------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rasa.voice.outcome` | string | Yes      | `completed`<br /><br />`interrupted` — the caller interrupted the agent<br /><br />`cancelled` — the channel cancelled playback<br /><br />`error` |

### `rasa.voice.operation.failures`

Counts unexpected failures in streaming voice operations. Expected outcomes,
such as an ignored barge-in, a DTMF timeout, or interrupted or cancelled
playback, are not counted.

Use it to identify failures by component, operation, provider, and error type.

| Detail | Value                  |
| ------ | ---------------------- |
| Kind   | Counter                |
| Unit   | Failures (`{failure}`) |

**Dimensions**

| Dimension               | Type   | Required | Values                                                                                                                                                              |
| ----------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rasa.voice.component`  | string | Yes      | `asr`<br /><br />`tts`<br /><br />`playback`<br /><br />`composer`<br /><br />`channel`                                                                             |
| `rasa.voice.operation`  | string | Yes      | `connect`<br /><br />`disconnect`<br /><br />`transcribe`<br /><br />`synthesize`<br /><br />`play`<br /><br />`process_channel_message`<br /><br />`compose_event` |
| `rasa.voice.provider`   | string | No       | ASR or TTS provider name, when applicable; free-form                                                                                                                |
| `rasa.voice.error_type` | string | Yes      | Exception class name or explicit error value; free-form. Exception messages are excluded.                                                                           |

### `rasa.voice.barge_in.decisions`

Counts one accepted or ignored barge-in decision for each transcript update Rasa
evaluates, including partial transcripts. Decisions are made when interruptions
are enabled and the caller speaks while agent audio is playing or waiting to
play. One caller interruption can produce several ignored decisions before an
accepted one. Other caller speech that does not result in a decision is not
counted.

Use it to compare accepted and ignored decisions and their reasons.

| Detail | Value                    |
| ------ | ------------------------ |
| Kind   | Counter                  |
| Unit   | Decisions (`{decision}`) |

**Dimensions**

| Dimension            | Type   | Required | Values                                                                                                                                                                            |
| -------------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rasa.voice.outcome` | string | Yes      | `accepted` / `ignored`                                                                                                                                                            |
| `rasa.voice.reason`  | string | No       | `below_min_words` — the transcript did not reach the configured minimum word count<br /><br />`word_threshold_reached` — the transcript reached the configured minimum word count |

### `rasa.voice.dtmf.decisions`

Counts accepted DTMF input, keypresses received when Rasa is not waiting for
DTMF input, and DTMF input attempts that time out. Keypresses are not counted
individually while Rasa waits for the full input.

Use it to compare keypad interaction outcomes without recording the digits
entered.

| Detail | Value                    |
| ------ | ------------------------ |
| Kind   | Counter                  |
| Unit   | Decisions (`{decision}`) |

**Dimensions**

| Dimension            | Type   | Required | Values                                                                                                     |
| -------------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------- |
| `rasa.voice.outcome` | string | Yes      | `accepted`<br /><br />`ignored`<br /><br />`timeout`                                                       |
| `rasa.voice.reason`  | string | No       | Reason for the decision, when provided; free-form. Rasa currently omits this dimension for DTMF decisions. |

### `rasa.voice.silence_timeouts`

Counts silence timers that expire and trigger a turn. Timers cancelled before
they expire are not counted.

Use it to compare counts across configured timeout values.

| Detail | Value                  |
| ------ | ---------------------- |
| Kind   | Counter                |
| Unit   | Timeouts (`{timeout}`) |

**Dimensions**

| Dimension                      | Type   | Required | Values                                                                                                       |
| ------------------------------ | ------ | -------- | ------------------------------------------------------------------------------------------------------------ |
| `rasa.voice.outcome`           | string | Yes      | `accepted`                                                                                                   |
| `rasa.voice.silence.timeout_s` | double | No       | Configured timeout in seconds, rounded to one decimal place; this is a configuration value, not elapsed time |

### `rasa.voice.audio.bytes`

Counts audio bytes processed during streaming voice calls. At the end of a call,
Rasa records the total for each direction with more than zero bytes. Directions
with no audio and ongoing calls are not included.

Use it to compare incoming and outgoing audio volume.

| Detail | Value        |
| ------ | ------------ |
| Kind   | Counter      |
| Unit   | Bytes (`By`) |

**Dimensions**

| Dimension                    | Type   | Required | Values                                                                                 |
| ---------------------------- | ------ | -------- | -------------------------------------------------------------------------------------- |
| `rasa.voice.audio.direction` | string | Yes      | `input` — caller audio received by Rasa<br /><br />`output` — audio sent to the caller |

## Turn metrics

Turn metric names apply across channels, but Rasa records them only for turns
handled by Maestro agents. Supported inputs are text and, on streaming voice
channels, speech, completed DTMF input, and accepted silence timeouts. Session
start and end turns are not measured. A voice barge-in marks the current turn as
interrupted instead of creating another measured turn.

### `rasa.turn.duration`

Records how long Rasa processes a turn started by customer input. Rasa records
it when the turn completes, is interrupted, is cancelled, or fails. Session
start and end turns are not included.

Use it to compare processing times and outcomes by input type.

| Detail               | Value                                                                |
| -------------------- | -------------------------------------------------------------------- |
| Kind                 | Histogram                                                            |
| Unit                 | Seconds (`s`)                                                        |
| Histogram boundaries | `0.1`, `0.25`, `0.5`, `1`, `2.5`, `5`, `10`, `20`, `30`, `60`, `120` |

**Dimensions**

| Dimension              | Type   | Required | Values                                                                                                                                                                                            |
| ---------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rasa.turn.input.type` | string | Yes      | `speech`<br /><br />`text`<br /><br />`dtmf`<br /><br />`silence_timeout`                                                                                                                         |
| `rasa.turn.outcome`    | string | Yes      | `completed`<br /><br />`interrupted` — new user input interrupted the turn<br /><br />`cancelled` — the call ended or Rasa shut down<br /><br />`error` — an unhandled or engine-reported failure |

### `rasa.turn.time_to_first_output`

Measures the time from when Rasa receives input for a turn until it produces the
first output. It includes any delay before engine processing begins.

For text turns, timing starts when the customer's message arrives and ends when
the first customer-facing text is produced.

For voice turns, timing starts when Rasa receives the final speech transcript,
DTMF input is complete, or a silence timeout is accepted. When consecutive
final transcripts are merged, timing starts from the latest one. It ends when
Rasa produces the first TTS audio chunk.

Turns that produce no output for the customer in that channel are omitted,
including turns interrupted before the first output.

Use it to compare recorded input-to-first-output latency (an indicator of
user-perceived latency) by input and output type.

| Detail               | Value                                                                       |
| -------------------- | --------------------------------------------------------------------------- |
| Kind                 | Histogram                                                                   |
| Unit                 | Seconds (`s`)                                                               |
| Histogram boundaries | `0.05`, `0.1`, `0.25`, `0.5`, `0.75`, `1`, `1.5`, `2`, `3`, `5`, `10`, `30` |

**Dimensions**

| Dimension               | Type   | Required | Values                                                                    |
| ----------------------- | ------ | -------- | ------------------------------------------------------------------------- |
| `rasa.turn.input.type`  | string | Yes      | `speech`<br /><br />`text`<br /><br />`dtmf`<br /><br />`silence_timeout` |
| `rasa.turn.output.type` | string | Yes      | `audio`<br /><br />`text`                                                 |
