[[["容易理解","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-05 (世界標準時間)。"],[],[],null,["# Notes on terminology\n\nThe words *name* , *type* , *kind* , *metric* , and *resource* appear in\nvarious combinations and contexts related to Cloud Monitoring, and the\nusages aren't always consistent. For example, here are some common patterns:\n\n- The term *metric* might be used, in different contexts, to refer to any of\n the following:\n\n - A general \"something\" to be measured\n - A metric type\n - A time series\n - A set of time series associated with a metric type\n - The [`Metric`](/monitoring/api/ref_v3/rest/v3/TimeSeries#Metric) structure embedded in a [`TimeSeries`](/monitoring/api/ref_v3/rest/v3/TimeSeries) structure\n- A string like `storage.googleapis.com/api/request_count` might be referred to\n as any of the following:\n\n - A metric\n - A metric name\n - A metric type\n - A metric type name\n- The string like `gcs_bucket` might be referred to as any of the following:\n\n - A resource name^1^\n - A monitored resource\n - A monitored-resource type\n - A monitored-resource name\n\n^1^ The REST API reference material also makes frequent use of the term *resource name* , which usually has nothing to do with monitored resources. This term is described in more detail in [Resource names](/monitoring/api/v3/terminology#resource-name).\n\nThis section provides some guidance on possibly confusing terminology.\n\nTypes and names\n---------------\n\nDescriptors for metric types and monitored resources have both names\nand types. It is common in casual usage to use the terms interchangeably.\n\nFor example, the string `storage.googleapis.com/api/request_count` is a\n**metric type**, though it is also referred to as a name or a type name.\n\nIf you look at the descriptor for this metric type, you see these two\nkey-value pairs, `name` and `type`: \n\n```\n{\n \"name\": \"projects/[PROJECT_ID]/metricDescriptors/storage.googleapis.com/api/request_count\",\n ...\n \"type\": \"storage.googleapis.com/api/request_count\",\n}\n```\n\nThe `type` in a metric descriptor is a string that encodes information about\nthe service generating the data (for example, `storage.googleapis.com`) and\nwhat's being measured (`api/request_count`).\n\nIn a metric descriptor, the value of the `name` is the fully-qualified version\nof metric type; the `name` value is the `type` value prefixed with this string: \n\n```\nprojects/[PROJECT_ID]/metricDescriptors/\n```\n\nA similar pattern holds for monitored resources. The `type` is a label\nfor some kind of resource, and the `name` consists of the `type` value\nprefixed with this string: \n\n```\nprojects/[PROJECT_ID]/monitoredResourceDescriptors/\n```\n\nThe following example corresponds to the `api` entry in the [list of\nmonitored resources](/monitoring/api/resources#tag_api): \n\n```\n{\n \"type\": \"api\",\n ...\n \"name\": \"projects/[PROJECT_ID]/monitoredResourceDescriptors/api\"\n}\n```\n\nThe value of `name` within a project is entirely predictable from the value\nof `type`, but they are not exactly the same thing. However, the terms\nare often used imprecisely in casual discussion.\n| **Key Point:** In almost all cases, use of \"metric type\", \"metric name\", or \"metric type name\" refers to the metric type as described here. The word \"metric\" typically means the time series associated with a metric type. The phrase \"monitored resource\" usually means the type or a particular physical entity described by a type.\n\nMetric kind and value type\n--------------------------\n\nThere are two other terms that can be confused with \"metric type\":\n\n- Value type\n- Metric kind\n\nThese terms are not alternate terms for \"metric type\".\n\n\"Value type\" and \"metric kind\" describe the data\ncollected. They are both related to the programming concept\n\"datatype\".\n\n- The value type describes the individual values.\n- The metric kind describes how the values are related to each other.\n\nSee [Metric kinds and types](/monitoring/api/v3/kinds-and-types) for details.\n\nResource names\n--------------\n\nThe pattern of creating a `name` value by prefixing a string to a `type` (or other) value extends far beyond metric and monitored-resource types. It appears with almost anything that creates uniquely identifiable data. For example, both [`MetricDescriptor`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricDescriptor) and [`AlertPolicy`](/monitoring/api/ref_v3/rest/v3/projects.alertPolicies#AlertPolicy) follow this pattern.\n\nThe value of the `name` field is often described in reference documentation\nas a \"resource name\":\n\nHere are some examples of some structures that have resource names and how\nthey are derived:\n\n- Metric descriptors: join the values of the prefix and the `type` field:\n - Prefix: `projects/[PROJECT_ID]/metricDescriptors`\n - `type` (sample): `storage.googleapis.com/api/request_count`\n - `name`: `projects/[PROJECT_ID]/metricDescriptors/storage.googleapis.com/api/request_count`\n- Monitored-resource descriptors: join the values of the prefix and the `type` field:\n - Prefix: `projects/[PROJECT_ID]/monitoredResourceDescriptors`\n - `type` (sample): `api`\n - `name`: `projects/[PROJECT_ID]/monitoredResourceDescriptors/api`\n- Alerting policies: join the values of the prefix and a generated ID\n - Prefix: `projects/[PROJECT_ID]/alertPolicies`\n - Alert-policy ID: a number generated when the policy was created\n - `name`: `projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]`\n\nThe term \"resource name\" refers to a resource in the hierarchy of\na service's API, and isn't related to the concept of monitored resources in\nany way. For more information about resource names in the design of an API,\nsee [Resource names](/apis/design/resource_names).\n| **Key Point:** In the Cloud Monitoring API, when a `name` field is described as a \"resource name\", the value for that field is a fully qualified identifier created by taking a `type` (or other field) value and prefixing it with the string that identifies the type of resource."]]