Access metrics

This document describes how to access the metrics generated by your Gemini Enterprise app. These metrics provide insights into the performance and health of your application.

You can view metric telemetry using either the Metrics Explorer or directly within individual agents using the agent's Metrics tab.

Key concepts

This section introduces key concepts related to observability in Gemini Enterprise.

Concept Description
Metrics Metrics are numerical measurements that systems collect over time. These measurements represent the performance, resource utilization, or behavior of a system. Engineers use metrics to monitor system health, identify trends, and trigger alerts.

Before you begin

Make sure you have the following:

  • The Gemini Enterprise Admin role or Google Cloud console Gemini Enterprise User role.

  • An existing Gemini Enterprise web app. For information about creating a new app, see Create an app.

  • To access the Metrics Explorer, you must have the Monitoring Viewer role (roles/monitoring.viewer).

  • In the Gemini Enterprise app configurations, enable the Enable instrumentation of OpenTelemetry traces and logs setting. For more information, see Manage observability settings.

Access metrics in Metrics Explorer

To access the metrics, follow these steps:

  1. In the Google Cloud console, go to the Metrics Explorer page.

    Go to Metrics Explorer

  2. Select the Google Cloud project where your Gemini Enterprise app was created.

  3. Click Select a metric to open a search bar.

  4. In the search bar, look for the following metrics:

    Metric Name Description
    Gemini Enterprise Agent - Gemini Enterprise Agent Session Count The number of sessions handled by the Gemini Enterprise Agent.
    Gemini Enterprise Agent - Gemini Enterprise Agent Tool Count The number of times tools were invoked by the Gemini Enterprise Agent.
    Gemini Enterprise Agent - Gemini Enterprise Agent Turn Count The number of conversational turns within Gemini Enterprise Agent sessions.
    Gemini Enterprise Agent - Gemini Enterprise Agent Total Latency The total latency of responses from the Gemini Enterprise Agent.
    Gemini Enterprise Agent - Gemini Enterprise Agent Tool Total Latency The total latency incurred by tool executions within the Gemini Enterprise Agent.
    Gemini Enterprise DataConnector - Gemini Enterprise DataConnector Request Count The total count of requests made to the Gemini Enterprise data connectors (also referred to as data stores in the Google Cloud console).
  5. Select the metric you want to explore and click Apply.

  6. Optionally, set additional label filters, aggregation elements, and adjust the time range.

    Screenshot of the Metrics Explorer in the Google Cloud console, showing Gemini Enterprise Agent metrics.

Access metrics for agents

You can also view operational, tool-specific, and session metric dashboards directly for individual agents on the agent's Metrics tab in the Google Cloud console.

To access metrics for an agent:

  1. In the Google Cloud console, navigate to your app, and then click Agents.
  2. Select the agent you want to inspect, and then click the Metrics tab.

The Metrics tab provides key operational telemetry divided into two views: Overview and Tools.

Overview metrics

This view provides a dashboard summarizing standard session and agent health data, which includes:

  • Sessions: Total user session count.
  • Avg. time per session: Average time elapsed during a session.
  • Agent invocations: Total times that the agent was called.
  • Agent latency: Latency across time and specific metrics.
  • Agent traffic: Inbound request volume.
  • Agent error rate: Percentage of failed agent invocations.

Screenshot of the Metrics Overview tab in the Google Cloud console, showing sessions, average turns per session, and agent invocations, latency, traffic, and error rate

Tools metrics

This view focuses specifically on the usage and latency of tools connected to your agent, which includes:

  • Total calls: Number of tool execution requests.
  • P95 duration by tool: The 95th percentile latency of executions, categorized by tool.
  • Count of calls by tool: Total call count divided among different tools.
  • Error rate by tool: The failure rate of executions by tool.
  • "No tool called" rate: The rate at which interactions did not trigger any tool execution.

What's next