

As of November 7, 2025, you can't create new repository associations in Amazon CodeGuru Reviewer. To learn about services with capabilities similar to CodeGuru Reviewer, see [Amazon CodeGuru Reviewer availability change](https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/codeguru-reviewer-availability-change.html).

# Monitoring CodeGuru Reviewer with Amazon CloudWatch
<a name="monitoring"></a>

You can use Amazon CloudWatch to monitor the number of recommendations created for your source code in an associated repository over time. 

The recommendations are available for three *dimensions*: 
+  `ProviderType` – View the number of recommendations for a provider type. You can view the count of recommendations in all repositories in AWS CodeCommit, your Bitbucket account, your GitHub account, or your GitHub Enterprise Server account, over a period of time. 
+  `CodeReviewType` – View the number of recommendations for a code review type. The one available code review type is `PullRequest`. Use it to view the count of recommendations in one pull request. 
+  `RepositoryName` – View the count of recommendations for one repository over a period of time. 

You can set a CloudWatch alarm that notifies you when the number of recommendations exceeds a threshold you set. 

For more information about creating and using CloudWatch alarms and metrics, see [Using Amazon CloudWatch alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html). 

You can track the following metric for each dimension over a period of time. 


****  

|  Metric  |  Description  | 
| --- | --- | 
| RecommendationsPublishedCount |  The number of recommendations over a period of time per `ProviderType`, `CodeReviewType`, or `RepositoryName` for completed code reviews. Units: Count Valid CloudWatch statistic: Count Valid CloudWatch period: 1 hour  | 

**Topics**
+ [

# Monitoring recommendations with CloudWatch metrics
](cloudwatch-metric.md)
+ [

# Monitoring CodeGuru Reviewer recommendations with CloudWatch alarms
](cloudwatch-alarm.md)

# Monitoring recommendations with CloudWatch metrics
<a name="cloudwatch-metric"></a>

You can view Amazon CodeGuru Reviewer metrics in the Amazon CloudWatch console.<a name="cloudswatch-console-procedure"></a>

**To access recommendation metrics**

1. Sign in to the AWS Management Console and open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/).

1. In the navigation pane, choose **Metrics**. 

1. On the **All metrics** tab, choose **AWS/CodeGuruReviewer**. 

1. Choose the dimension you want metrics for: **ProviderType**, **CodeReviewType**, or **RepositoryName**. The graph on the page displays metrics for recommendations for all selected items that are available for the selected dimension. 

# Monitoring CodeGuru Reviewer recommendations with CloudWatch alarms
<a name="cloudwatch-alarm"></a>

You can create an Amazon CloudWatch alarm for your CodeGuru Reviewer recommendations to monitor their count over time. 

An alarm watches the number of recommendations for one of three CodeGuru Reviewer CloudWatch dimensions that you specify: 
+  `ProviderType` – View the number of recommendations for a provider type. You can view the count of recommendations in all repositories in AWS CodeCommit, your Bitbucket account, your GitHub account, or your GitHub Enterprise Server account, over a period of time. 
+  `CodeReviewType` – View the number of recommendations for a code review type. The one available code review type is `PullRequest`. Use it to view the count of recommendations in one pull request. 
+  `RepositoryName` – View the count of recommendations for one repository over a period of time. 

You set one or more actions that happen when the number of recommendations for a dimension exceeds a count over a number of time periods you choose. For example, you can specify that an Amazon SNS notification is sent when more than 25 recommendations are generated for a branch in a repository within an hour. 

A user or role must have CloudWatch `PutMetricAlarm` permissions to create an alarm. For more information, see [Using identity-based policies for CodeGuru Reviewer](auth-and-access-control-iam-identity-based-access-control.md) and [Amazon CloudWatch permissions reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/permissions-reference-cw.html) in the *Amazon CloudWatch User Guide*. 

**To create a CloudWatch alarm for CodeGuru Reviewer recommendations**

1. Sign in to the AWS Management Console and open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/).

1. In the navigation pane, choose **Alarms**.

1. Choose **Create alarm**.

1. Choose **Select metric**.

1. Choose **AWS/CodeGuruReviewer**.

1. Choose the dimension to monitor: **ProviderType**, **CodeReviewType**, or **RepositoryName**. Then choose a metric to create an alarm for. 

1. Continue through the process to create your alarm.

   For more information about setting up CloudWatch alarms in the CloudWatch console, see [Using Amazon CloudWatch alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html) in the *Amazon CloudWatch User Guide*. 