Monitor Gemini for Google Cloud usage

This document describes how to monitor Gemini for Google Cloud usage in your organization.

Gemini for Google Cloud automatically collects and stores metrics in Cloud Monitoring.

You can use the data visualization and analysis tools in Cloud Monitoring to help you answer important questions, such as how many daily active users in your organization are using Gemini for Google Cloud.

Limitations

The metrics data recorded by Gemini in Google Cloud doesn't include user interactions with the following products:
  • Gemini in BigQuery
  • Gemini in Looker
  • Gemini in Google Security Operations
  • Gemini pane in the Google Cloud console for Database Center

Before you begin

To get the permissions that you need to view metric data by using the Google Cloud console, ask your administrator to grant you the Monitoring Viewer (roles/monitoring.viewer) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Available metrics

The following table displays all available Gemini for Google Cloud metrics:

Metric Description
cloudaicompanion.googleapis.com/usage/responses/daily_active_users Daily active users, defined as users who have been sent a response from a Gemini for Google Cloud service.
cloudaicompanion.googleapis.com/usage/responses/seven_day_active_users Seven day active users, defined as users who have been sent a response from a Gemini for Google Cloud service.
cloudaicompanion.googleapis.com/usage/responses/twenty_eight_day_active_users Twenty-eight day active users, defined as users who have been sent a response from a Gemini for Google Cloud service.
cloudaicompanion.googleapis.com/usage/response_count Number of responses sent from a Gemini for Google Cloud service. Some responses, such as duplicates, may be hidden.

View Gemini for Google Cloud metrics in your project

Cloud Monitoring automatically installs a project-specific Gemini for Google Cloud dashboard when you enable and use the Gemini for Google Cloud API.

To view aggregated metrics for Gemini for Google Cloud metrics, do the following:

  1. In the Google Cloud console, go to the  Dashboards page:

    Go to Dashboards

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. In the list, click Gemini.

  3. Click Usage.

Metric labels for non-user metrics

The following list includes all labels included with Gemini for Google Cloud metrics. You can use these labels as filters in the Monitoring dashboard when you view metrics.

  • method - The service that the user interacted with, including CODE_COMPLETION, CODE_GENERATION, TEXT_GENERATION, TASK_COMPLETION.

  • product - The Gemini for Google Cloud product that received or generated the message, such as CODEASSIST.

What's next