Session analysis

Updated at:

The Session Analysis page analyzes your AI Agent's interactions from a session perspective, covering session-level usage, resource consumption, and user activity to help you optimize service quality.

Prerequisites

  • You have activated Cloud Monitor 2.0 and created a workspace.

  • You have ingested your AI Agent's observability data into the current workspace.

Procedure

Log on to the Cloud Monitor 2.0 console, select the target workspace, and in the left-side navigation pane, choose AI Agent Observability. Click the Session Analysis tab.

Core metrics

At the top of the page, four core metric cards summarize session data for the selected time range. Each metric includes a day-over-day change rate for trend analysis.

Metric

Description

Sessions

Total sessions in the selected time range.

Average session duration

The average duration of all sessions.

Average session turns

Average user-agent interaction turns per session.

Users

Total active users in the selected time range.

Note

Use the Settings, Visualize, Favorite, and Expand buttons at the top right of each metric card to customize the metric or view its trend in a chart.

View modes

At the top right of the page, you can switch between two view modes:

View mode

Description

Session view

The default view. Data is displayed by session, with each row representing a single session record.

User view

Data is displayed by user, aggregating multiple sessions from the same user.

Search and filter

Use the search bar to search session content by keyword. Enter a query and press Enter to search.

Note

Press Shift+Enter in the search bar to create a new line for multi-line queries.

Session list

In the session view, all sessions are listed with the following columns.

Field

Description

Session ID

The unique identifier for the session. Click a Session ID to go to the session details page.

Start time

The timestamp when the session started.

Session duration

The duration of the session from start to finish.

Turns

Number of user-agent interaction turns in the session.

Total tokens

The total number of tokens consumed in the session, including input and output tokens.

Input tokens

The number of tokens consumed by user input.

Output tokens

The number of tokens consumed by agent output.

User ID

The identifier for the user who initiated the session.

Actions

Click Details to view the complete interaction history and trace information for the session.

User view

  1. At the top right of the page, click User view.

  2. View session statistics aggregated by user.

Session details

  1. In the session list, find the target session.

  2. In the row for that session, click the Session ID or click Details in the Actions column.

  3. On the session details page, view the complete interaction record, token consumption for each turn, and trace information.

    Field

    Description

    Session ID

    The unique identifier for the current session.

    Start time

    The time when the first request in the session was initiated.

    Total duration

    The cumulative execution time of all traces within the session.

    Turns

    The number of conversation turns in the session.

    Total tokens

    The total number of tokens consumed in the session.

    Input tokens

    The total number of input tokens consumed in the session.

    Output tokens

    The total number of output tokens consumed in the session.

    User ID

    The identifier for the user who initiated the session.

  4. The Trace List on the left displays all traces in the session in execution order. Click a Trace ID to go to the corresponding trace details page for further analysis of the span hierarchy, inference process, and performance metrics.

    • At the top, a timeline visualizes the start time and duration distribution of traces in chronological order.

    • Each trace appears as an expandable card. Expanding the card reveals a Gantt-style duration bar and core fields:

      Field

      Description

      Trace ID

      The unique identifier for the current trace. You can click it to view the full trace details.

      Total tokens

      The total number of tokens consumed by this trace.

      Input tokens

      The number of input tokens consumed by this trace.

      Output tokens

      The number of output tokens consumed by this trace.

      TTFT

      Time To First Token.

      LLM calls

      The number of LLM calls in this trace.

      Tool calls

      The number of tool calls in this trace.

      Tool call errors

      The number of tool call errors in this trace.

  5. The session message area on the right side of the page displays the complete user-assistant interaction flow in chronological order using chat bubbles.

    • User message: Right-aligned and labeled as "user", it shows the raw input content (such as text or parameters) that the user sent to the AI Agent.

    • Assistant message: Left-aligned and labeled as "assistant", it shows the response content (such as text, generated file URIs, or structured output) that the AI Agent returned to the user.

      Each message displays its timestamp. Bubbles render long text and structured JSON content in full and provide a Copy action.

      At the top right, you can switch between Formatted and Raw data views:

      Mode

      Description

      Formatted

      Renders message content in a user-friendly format for easy reading.

      Raw data

      Displays the raw message data in JSON format, which is useful for debugging.

Common use cases

  • Conversation playback and quality audit: Replay the complete message flow to analyze the agent's semantic understanding, response relevance, and context retention across multiple turns.

  • Multi-turn performance analysis: Use the trace list and timeline to view the TTFT, duration, and token consumption for each turn, to identify slow responses or turns with abnormal token consumption.

  • Abnormal session troubleshooting: After locating a trace with errors, click the Trace ID to open the trace details page. There, examine the error stack and context of specific spans to quickly identify the cause of failure.

  • User behavior analysis: Combine User IDs with session message content to analyze the interaction habits and query patterns of typical users, providing valuable input for agent optimization.