Chart request counts per repository in the Metrics Explorer

This page describes how you can chart Artifact Registry request count metrics in the Metrics Explorer, and manipulate the chart by different parameters such as read requests, write requests, method and repository ID.

Required roles

To get the permissions that you need to view monitoring data and configuration information, ask your administrator to grant you the Monitoring Viewer (roles/monitoring.viewer) IAM role on the Google Cloud project. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

For more information about controlling access to monitoring data, read Control access with IAM.

Chart API request counts per repository

When using Metrics Explorer, you can select the data to chart by making selections in the menus or by entering a PromQL query. For more information about creating charts, see Create a chart in the Metrics Explorer.

To view the metrics for a monitored resource by using the Metrics Explorer, do the following:

  1. In the Google Cloud console, go to the  Metrics explorer page:

    Go to Metrics explorer

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. In the Metric element, expand the Select a metric menu, enter Artifact Registry in the filter bar, and then use the submenus to select a specific resource type and metric:
    1. In the Active resources menu, select Artifact Registry Repository.
    2. In the Active metric categories menu, select Repository.
    3. In the Active metrics menu, select Data plane API request count per repository. Data plane API requests are made by tools like Docker, Maven, Pip, Twine, or Gradle tools that make requests to the data-plane API. You can view all methods that create requests to the data-plane API in Data plane API.

      If you want to view control plane API requests made by methods listed in google.devtools.artifactregistry.v1.ArtifactRegistry, then select Control plane API request count per repository.

    4. Click Apply.
    The fully qualified name for this metric is artifactregistry.googleapis.com/repository/request_count.
  3. Configure how the data is viewed. To specify a subset of data to display, in the Filter element, select Add filter, and then complete the dialog.

    For example, you can view data for the following:

    • Read requests: apply a filter for the Metric label type equal to the value READ.
    • Write requests: apply a filter for the Metric label type equal to the value WRITE.
    • Method: apply a filter for the Metric label method with a value from the methods listed in the Data plane API. For example, apply a filter method equal to the value of Docker-DeleteBlob to filter for image layer deletion.
    • Repository ID: apply a filter for the Metric label repository_id equal to the repository ID. For example my-repo.

      For more information about configuring a chart, see Select metrics when using Metrics Explorer.

You can add multiple filters. For more information on filtering data, see Filter charted data and the labels descriptions for Artifact Registry metrics in the list of Google Cloud Metrics.

For more information on selecting data, see Select the data to chart.

What's next