在「Active metrics」(使用中的指標) 選單中,選取「Data plane API request count per repository」(每個存放區的資料平面 API 要求數)。
資料平面 API 要求是由 Docker、Maven、Pip、Twine 或 Gradle 等工具提出,這些工具會向資料平面 API 提出要求。如要查看所有建立資料平面 API 要求的方法,請參閱「資料平面 API」。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThis guide explains how to chart Artifact Registry request count metrics using the Metrics Explorer in Google Cloud.\u003c/p\u003e\n"],["\u003cp\u003eYou can view data plane and control plane API requests, which are made by methods listed in the audit logs.\u003c/p\u003e\n"],["\u003cp\u003eTo view monitoring data, you need the Monitoring Viewer IAM role or equivalent permissions.\u003c/p\u003e\n"],["\u003cp\u003eYou can filter the charted data to view specific types of requests such as read, write, a specific method, or by a particular repository ID.\u003c/p\u003e\n"],["\u003cp\u003eThe fully qualified name for the metric being discussed is \u003ccode\u003eartifactregistry.googleapis.com/repository/request_count\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Chart request counts per repository in the Metrics Explorer\n\nThis page describes how you can chart Artifact Registry request count metrics in\nthe Metrics Explorer, and manipulate the chart by different parameters such\nas read requests, write requests, method and repository ID.\n\nRequired roles\n--------------\n\n\nTo get the permissions that\nyou need to view monitoring data and configuration information,\n\nask your administrator to grant you the\n\n\n[Monitoring Viewer](/iam/docs/roles-permissions/monitoring#monitoring.viewer) (`roles/monitoring.viewer`)\nIAM role on the Google Cloud project.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nFor more information about controlling access to monitoring data, read\n[Control access with IAM](/monitoring/access-control#grant_access_to_monitoring-gcloud).\n\nChart API request counts per repository\n---------------------------------------\n\nWhen using Metrics Explorer, you can select the data to chart by making\nselections in the menus or by entering a PromQL query. For more information\nabout creating charts, see\n[Create a chart in the Metrics Explorer](/monitoring/charts/metrics-explorer).\n\nTo view the metrics for a monitored resource by using the\nMetrics Explorer, do the following:\n\n1. In the Google Cloud console, go to the\n *leaderboard* **Metrics explorer** page:\n\n [Go to **Metrics explorer**](https://console.cloud.google.com/monitoring/metrics-explorer)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **Monitoring**.\n2. In the toolbar of the Google Cloud console, select your Google Cloud project. For [App Hub](/app-hub/docs/overview) configurations, select the App Hub host project or the app-enabled folder's management project.\n3. 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:\n 1. In the **Active resources** menu, select **Artifact Registry Repository**.\n 2. In the **Active metric categories** menu, select **Repository**.\n 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](/artifact-registry/docs/audit-logging#Data%20plane%20API).\n\n \u003cbr /\u003e\n\n If you want to view control plane API requests made by methods listed in\n [`google.devtools.artifactregistry.v1.ArtifactRegistry`](/artifact-registry/docs/audit-logging#google.devtools.artifactregistry.v1.ArtifactRegistry),\n then select **Control plane API request count per repository**.\n\n\n 4. Click **Apply**.\n\n The fully qualified name for this metric is `artifactregistry.googleapis.com/repository/request_count`.\n4. 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.\n\n \u003cbr /\u003e\n\n For example, you can view data for the following:\n - Read requests: apply a filter for the **Metric label** `type` equal to the value `READ`.\n - Write requests: apply a filter for the **Metric label** `type` equal to the value `WRITE`.\n - Method: apply a filter for the **Metric label** `method` with a value from the methods listed in the [Data plane API](/artifact-registry/docs/audit-logging#Data%20plane%20API). For example, apply a filter `method` equal to the value of `Docker-DeleteBlob` to filter for image layer deletion.\n - Repository ID: apply a filter for the **Metric label** `repository_id` equal to the repository ID. For example `my-repo`.\n\n For more information about configuring a chart, see\n [Select metrics when using Metrics Explorer.](/monitoring/charts/metrics-selector)\n\nYou can add multiple filters. For more information on filtering data, see\n[Filter charted data](/monitoring/charts/metrics-selector#filter-option) and\nthe labels descriptions for Artifact Registry metrics in the list of\n[Google Cloud Metrics](https://cloud.google.com/monitoring/api/metrics_gcp_a_b#gcp-artifactregistry).\n\nFor more information on selecting data, see\n[Select the data to chart](/monitoring/charts/metrics-selector).\n\nWhat's next\n-----------\n\n- Learn how to [save a chart for future reference](/monitoring/charts/metrics-explorer#save).\n- View Artifact Registry data-plane and control-plane methods that you can use as filters in [API interface audit logs](/artifact-registry/docs/audit-logging#api-interface-reference).\n- [Explore charted data](/monitoring/charts/working-with-charts)."]]