

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 Amazon CloudWatch 監控 Amazon Q Developer
<a name="monitoring-cloudwatch"></a>

**注意**  
此處討論的指標僅與[在 IDE 中使用 Amazon Q](q-in-IDE.md) 相關。

您可以使用 CloudWatch 監控 Amazon Q Developer，CloudWatch 會收集原始資料並將該資料處理成可讀且近乎即時的指標。這些統計資料會保留 15 個月，以便您存取歷史資訊，並更清楚 Amazon Q 的執行效能。您也可以設定留意特定閾值的警示，當滿足這些閾值時傳送通知或採取動作。如需詳細資訊，請參閱 [Amazon CloudWatch 使用者指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/)。

Amazon Q Developer 服務會在 `AWS/Q` 命名空間中報告下列指標。


| 維度 | 指標 | 使用案例或說明 | 
| --- | --- | --- | 
| 計數 | 調用 | 您想要確定經過一段時間計算出的調用次數。 | 
| UserCount | DailyActiveUserTrend | 您想要確定每天的作用中使用者數量。 | 
| SubscriptionUserCount | SubscriptionCount | 您想要確定擁有付費訂閱的使用者數量。 | 
| UniqueUserCount | MonthlyActiveUniqueUsers | 您想要確定某一月份的作用中使用者數量。 | 
| ProgrammingLanguage、SuggestionState、CompletionType | GeneratedLineCount | 您想要確定 Amazon Q Developer 產生的行數。 | 
| ProgrammingLanguage、SuggestionState、CompletionType | SuggestionReferenceCount | 您想要已發生使用參考的建議觸發次數。 | 
| ProgrammingLanguage | CodeScanCount | 您想要確定已發生的程式碼掃描次數。 | 
| ProgrammingLanguage | TotalCharacterCount | 檔案中的字元數，包括來自 Amazon Q Developer 的所有建議。 | 
| ProgrammingLanguage | CodeWhispererCharacterCount | Amazon Q Developer 產生的字元數。 | 

若要彙總 Invocations，請使用總和統計資料。

若要彙總 DailyActiveUserTrend，請使用總和統計資料，並使用「1 天」作為期間。

若要彙總 SubscriptionCount，請使用總和統計資料。

若要彙總 MonthlyActiveUniqueUsers，請使用總和統計資料，並使用「30 天」作為期間。