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

# Trace Insights

> Break a session into traces and spans to find bottlenecks and debug errors.

The **Trace View** on the Dashboard breaks a session into a hierarchy of traces and spans for granular analysis. Use it to find where time goes in a turn and to debug errors across STT, LLM, TTS, and tool calls.

The Trace View offers an even deeper level of insight, breaking down the entire session into a hierarchical structure of traces and spans.

## Session Configuration

At the top level, the **Session Configuration** details every parameter the agent was initialized with: the STT, LLM, and TTS models, plus any function tools and MCP tools. Use it to reproduce and debug agent behavior.

<Frame caption="Session configuration in the Properties panel: STT, LLM, and TTS models plus function and MCP tools">
  <img src="https://mintcdn.com/zeroruntime/q3ZgSvvBl7VLzLk2/images/analytics-trace-overview.png?fit=max&auto=format&n=q3ZgSvvBl7VLzLk2&q=85&s=ac4cb4a7952c66421048892f47a89bf4" alt="Trace view hierarchy with the Session Configuration node selected, showing STT, LLM, and TTS models and function and MCP tools in the Properties panel" width="2371" height="1309" data-path="images/analytics-trace-overview.png" />
</Frame>

## User & Agent Turns

The core of the Trace View is the breakdown of the conversation into **User & Agent Turns**. Each turn is a single exchange between the user and the agent, with a detailed timeline of these spans:

| Span                | Measures                                          |
| ------------------- | ------------------------------------------------- |
| STT                 | Speech-to-text transcription duration.            |
| EOU                 | End-of-utterance detection timing.                |
| LLM                 | Response generation latency.                      |
| TTS                 | Text-to-speech synthesis duration.                |
| Time to First Byte  | Initial delay before the agent starts responding. |
| User Input Speech   | How long the user spoke.                          |
| Agent Output Speech | How long the agent's response played.             |

<Frame caption="A turn expanded into its STT, EOU, LLM, and TTS spans">
  <img src="https://mintcdn.com/zeroruntime/q3ZgSvvBl7VLzLk2/images/analytics-trace-turn.png?fit=max&auto=format&n=q3ZgSvvBl7VLzLk2&q=85&s=a6b7b349a9d360e7543ca676838c1570" alt="A user and agent turn expanded to show STT, EOU, LLM, and TTS processing spans along the timeline" width="2359" height="1394" data-path="images/analytics-trace-turn.png" />
</Frame>

## Turn Properties

For each turn, inspect the properties of the components involved: the transcript of the user's input, the response from the LLM, and any errors that occurred.

<Frame caption="Turn properties: the input transcript and LLM response in the Properties panel">
  <img src="https://mintcdn.com/zeroruntime/q3ZgSvvBl7VLzLk2/images/analytics-trace-turn-properties.png?fit=max&auto=format&n=q3ZgSvvBl7VLzLk2&q=85&s=d1f3913a6b3c456c4aea49d42059d150" alt="A turn selected in the trace view with its transcript and LLM response shown in the Properties panel" width="2368" height="798" data-path="images/analytics-trace-turn-properties.png" />
</Frame>

## Tool Calls

When the LLM invokes a tool, the Trace View shows details about the call, including the tool's name and the parameters it was called with. Use it to validate integrations and debug tool behavior.

<Frame caption="Tool call details: the tool name and the parameters it was invoked with">
  <img src="https://mintcdn.com/zeroruntime/q3ZgSvvBl7VLzLk2/images/analytics-trace-tool-call.png?fit=max&auto=format&n=q3ZgSvvBl7VLzLk2&q=85&s=f854b953bc64c504fb78df1180375817" alt="A tool call span selected in the trace view, showing the tool name and the parameters passed to it" width="2365" height="1249" data-path="images/analytics-trace-tool-call.png" />
</Frame>

## What's Next

<CardGroup cols={2}>
  <Card title="Observability Options" icon="sliders" href="/build/observability-and-monitoring/analytics/observability-options">
    View per-turn traces and metrics on the Dashboard.
  </Card>

  <Card title="Session Analytics" icon="chart-simple" href="/build/observability-and-monitoring/analytics/session-analytics">
    See session-level metrics and transcripts.
  </Card>
</CardGroup>

## References

<Tabs>
  <Tab title="Python">
    #### Examples

    <CardGroup cols={2}>
      <Card title="Observability Hooks" icon="github" href="https://github.com/ZeroRuntimeAI/zrt-python-sdk-examples/blob/main/features/metrics.py">
        Emit traces from a session.
      </Card>
    </CardGroup>

    #### SDK Reference

    <CardGroup cols={2}>
      <Card title="Metrics" icon="chart-simple" href="/api-reference/python/core/events">
        `Metrics` in the Python API reference.
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
