監控 Gemini 的 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 控制台查看指標資料所需的權限,請要求管理員授予您專案的監控檢視者 (roles/monitoring.viewer) 身分與存取權管理角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和機構的存取權」。

您或許還可透過自訂角色或其他預先定義的角色取得必要權限。

可用的指標

下表列出所有可用的 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 過去 7 天的活躍使用者人數,定義為收到 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 控制台中,前往「Dashboards」(資訊主頁)  頁面:

    前往「Dashboards」(資訊主頁)

    如果您是使用搜尋列尋找這個頁面,請選取子標題為「Monitoring」的結果

  2. 在清單中點選「Gemini for Google Cloud」

非使用者指標的指標標籤

以下列出 Gemini forGoogle Cloud 指標的所有標籤。查看指標時,您可以在 Monitoring 資訊主頁中使用這些標籤做為篩選器。

  • method - 使用者互動的服務,包括 CompleteCodeGenerateCodeGenerateTextCompleteTask

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

後續步驟