监控 Gemini 的 Google Cloud 用量

本文档介绍了如何监控贵组织中的 Gemini for Google Cloud 使用情况。

Gemini for Google Cloud 会自动在 Cloud Monitoring 中收集和存储指标。

您可以使用 Cloud Monitoring 中的数据可视化和分析工具来帮助您回答重要问题,例如贵组织中每天有多少活跃用户在使用 Gemini Google Cloud。

限制

Gemini 在 Google Cloud 中记录的指标数据不包括用户与以下产品的互动:
  • Gemini in BigQuery
  • Gemini in Looker
  • Google Security Operations 中的 Gemini
  • Google Cloud 控制台中适用于数据库中心的 Gemini 窗格

准备工作

如需获得使用 Google Cloud 控制台查看指标数据所需的权限,请让管理员向您授予项目的 Monitoring Viewer (roles/monitoring.viewer) IAM 角色。 如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限

您也可以通过自定义角色或其他预定义角色来获取所需的权限。

可用指标

下表显示了适用于Google Cloud 的所有可用 Gemini 指标:

指标 说明
cloudaicompanion.googleapis.com/usage/responses/daily_active_users 日活跃用户数,定义为收到了 Gemini for Service 发送的回应的用户。 Google Cloud
cloudaicompanion.googleapis.com/usage/responses/seven_day_active_users 过去 7 天内的活跃用户数,定义为收到了 Gemini for Service 发送的回应的用户。 Google Cloud
cloudaicompanion.googleapis.com/usage/responses/twenty_eight_day_active_users 28 天活跃用户数,是指收到 Gemini for Service 发送的回复的用户。 Google Cloud
cloudaicompanion.googleapis.com/usage/response_count 从 Gemini for Google Cloud 服务发送的响应数。系统可能会隐藏某些回复,例如重复的回复。

查看项目中的 Gemini Google Cloud 指标

当您启用并使用 Gemini for Google Cloud API 时,Cloud Monitoring 会自动安装特定于项目的 Gemini Google Cloud 信息中心

如需查看 Gemini for Google Cloud指标的汇总指标,请执行以下操作:

  1. 在 Google Cloud 控制台中,转到 信息中心页面:

    前往信息中心

    如果您使用搜索栏查找此页面,请选择子标题为监控的结果。

  2. 在列表中,点击 Gemini

  3. 点击用量

非用户指标的指标标签

以下列表包含 Gemini 中针对Google Cloud 指标包含的所有标签。在查看指标时,您可以在 Monitoring 信息中心中将这些标签用作过滤条件。

  • method - 用户互动过的服务,包括 CODE_COMPLETIONCODE_GENERATIONTEXT_GENERATIONTASK_COMPLETION

  • product - 接收或生成消息的 Gemini for Google Cloud 产品,例如 CODEASSIST

后续步骤