监控 Gemini for Google Cloud 使用情况

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

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

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

限制

Gemini in Google Cloud记录的指标数据包括用户在 IDE 中与 Gemini Code Assist 的互动。

准备工作

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

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

可用指标

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

指标 说明
cloudaicompanion.googleapis.com/usage/responses/daily_active_users 每日活跃用户数,定义为已收到 Gemini for Google Cloud 服务回答的用户数。
cloudaicompanion.googleapis.com/usage/responses/seven_day_active_users 七天活跃用户数,定义为已收到 Gemini for Google Cloud 服务回答的用户数。
cloudaicompanion.googleapis.com/usage/responses/twenty_eight_day_active_users 28 天活跃用户数,定义为已收到 Gemini for Google Cloud 服务回答的用户数。
cloudaicompanion.googleapis.com/usage/response_count 从 Gemini for Google Cloud 服务发送的回答数。某些回答(例如重复回答)可能会被隐藏。

查看项目中的 Gemini for Google Cloud 指标

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

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

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

    前往信息中心

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

  2. 在列表中,点击 Gemini

  3. 点击用量

非用户类指标的指标标签

以下列表包括 Gemini forGoogle Cloud 指标随附的所有标签。查看指标时,您可以在监控信息中心中将这些标签用作过滤条件。

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

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

后续步骤