Last updated: September 16, 2026
GCP Resources
This page documents how Dash0 identifies and names Google Cloud Platform resources using GCP semantic conventions from OpenTelemetry.
GCP resource detectors in OpenTelemetry SDKs automatically populate project, region, and service information. Enable the GCP resource detector for automatic attribute population.
Full Resource Names
Most GCP resources are identified through cloud.resource_id, which carries the Cloud Asset Inventory full resource name. Dash0 recognizes the following formats.
| Service | cloud.resource_id format |
|---|---|
| Cloud Run service | //run.googleapis.com/projects/PROJECT/locations/LOCATION/services/NAME |
| Cloud Run job | //run.googleapis.com/projects/PROJECT/locations/LOCATION/jobs/NAME |
| Pub/Sub topic | //pubsub.googleapis.com/projects/PROJECT/topics/TOPIC |
| Pub/Sub subscription | //pubsub.googleapis.com/projects/PROJECT/subscriptions/SUBSCRIPTION |
| Cloud Storage bucket | //storage.googleapis.com/BUCKET or //storage.googleapis.com/projects/_/buckets/BUCKET |
| Cloud SQL instance | //cloudsql.googleapis.com/projects/PROJECT/instances/NAME |
The host in the full resource name can differ from the host in the Cloud Asset Inventory asset type. Cloud SQL instances have the asset type sqladmin.googleapis.com/Instance but the resource name host cloudsql.googleapis.com. Dash0 matches on the resource name host.
Equality Rules
GCP resources are identified either by their platform-specific attributes or by their globally unique cloud.resource_id. Rules are evaluated in order, and the first match wins.
- Cloud Run through
cloud.platform:cloud.platform == "gcp_cloud_run"+cloud.account.id+cloud.region(orcloud.availability_zone) +faas.name. This is the same rule that covers AWS Lambda. All instances of the same Cloud Run service in the same region and account are grouped together. Missingcloud.account.idor region attributes do not break the rule, they contribute a fixed placeholder to the identity instead. - Any GCP resource with a full resource name:
cloud.provider == "gcp"+cloud.resource_id. This covers Cloud Run services and jobs, Pub/Sub topics and subscriptions, Cloud Storage buckets, and Cloud SQL instances, since the full resource name is globally unique on its own. - Fallback on
cloud.resource_idalone: applied whencloud.provideris absent, and only after theservice.namespace+service.name+service.instance.idtriplet has been tried. - Fallback on the account:
cloud.account.id+cloud.provider+cloud.platform. Resources that match nothing more specific collapse into a single per-project resource.
Cloud Run resources are identified by service name (like AWS Lambda), not per-instance. All instances of the same service share the same resource identity.
Naming Rules
Names are also resolved by first match. The faas.name rules rank above the cloud.resource_id rules, so a Cloud Run service that reports faas.name is named from that attribute even when it also carries a full resource name.
| Condition | Name |
|---|---|
cloud.platform == "gcp_cloud_run" + faas.name + region | <faas.name>:<cloud.region> (or <cloud.availability_zone>) |
cloud.platform == "gcp_cloud_run" + faas.name, no region | <faas.name> |
cloud.resource_id matches //storage.googleapis.com/... | Bucket name, from either the short or long format |
cloud.resource_id matches //pubsub.googleapis.com/... | Topic or subscription name |
cloud.resource_id matches //run.googleapis.com/... | Service or job name |
cloud.resource_id matches //cloudsql.googleapis.com/... | Instance name |
If the prefix matches but no name can be extracted from the full resource name, Dash0 falls back to a fixed service display name: Google Cloud Run, Google Pub/Sub, Google Cloud Storage, or Google Cloud SQL. These fallbacks rank below service.name, so a resource that reports a service name keeps it. The last resort is gcp:<cloud.account.id>.
Typing Rules
GCP resource types are assigned based on the cloud.platform attribute or the cloud.resource_id prefix.
| Condition | Type | UI Label |
|---|---|---|
cloud.platform == "gcp_cloud_run" | gcp.cloud.run | Cloud Run Services, Cloud Run Jobs |
cloud.resource_id matches //run.googleapis.com/... | gcp.cloud.run | Cloud Run Services, Cloud Run Jobs |
cloud.resource_id matches //storage.googleapis.com/... | gcp.cloud.storage | Cloud Storage |
cloud.resource_id matches //pubsub.googleapis.com/... | gcp.pubsub | Pub/Sub |
cloud.resource_id matches //cloudsql.googleapis.com/... | gcp.cloud.sql | Cloud SQL |
Resources that match none of these fall back to the cloud.account type.
Pub/Sub topics and subscriptions share the gcp.pubsub type, and Cloud Run services and jobs share the gcp.cloud.run type. Dash0 distinguishes them in the UI through the resource name and the full resource name.
Examples
- Cloud Run Service: For a service named
api-servicein regionus-central1, the name will beapi-service:us-central1and the typegcp.cloud.run - Cloud Run Job: For
cloud.resource_id = //run.googleapis.com/projects/my-project/locations/us-central1/jobs/nightly-export, the name will benightly-exportand the typegcp.cloud.run - Pub/Sub Topic: For
cloud.resource_id = //pubsub.googleapis.com/projects/my-project/topics/events-topic, the name will beevents-topicand the typegcp.pubsub - Pub/Sub Subscription: For
cloud.resource_id = //pubsub.googleapis.com/projects/my-project/subscriptions/events-worker, the name will beevents-workerand the typegcp.pubsub - GCS Bucket: For
cloud.resource_id = //storage.googleapis.com/my-data-bucket, the name will bemy-data-bucketand the typegcp.cloud.storage - Cloud SQL Instance: For
cloud.resource_id = //cloudsql.googleapis.com/projects/my-project/instances/orders-db, the name will beorders-dband the typegcp.cloud.sql
Best Practices
- Use GCP resource detectors to automatically populate project, region, and service information
- Include
cloud.account.idandcloud.regionfor proper resource identification and multi-region deployments - Set
faas.namefor Cloud Run services to ensure proper resource grouping - Set
cloud.resource_idto the full resource name for Pub/Sub, Cloud Storage, and Cloud SQL to enable resource correlation - Set
cloud.providertogcpso resources match the GCP equality rule instead of falling through to the generic rules - Keep the region consistent across data paths. A resource reported with a zonal region from one source and a regional one from another can fragment when the region is part of its identity
Further Reading
For more information on resource equality and GCP-specific configurations, explore the following resources.
Related Topics in This Section
- About Resources: Overview of resources in Dash0
- Explore Resources: Get started exploring resources in Dash0
- Why Resource Equality?: Practical examples of resource fragmentation scenarios
Dash0 Guides & Knowledge
- What are OpenTelemetry Resources?: Deep dive into how resources describe which system is generating telemetry data
- Service Attributes Best Practices: Learn what resource attributes are and how they can be categorized
- Kubernetes Attributes Best Practices: Best practices for Kubernetes resource attributes
OpenTelemetry Resources
- GCP Semantic Conventions: Official specification for GCP resource attributes
- FaaS Semantic Conventions: Cloud Run and serverless attributes
- Messaging Semantic Conventions: Pub/Sub messaging attributes
- OpenTelemetry SDKs: Language-specific SDK documentation
Google Cloud Resources
- Full resource names: Format of the identifiers used in
cloud.resource_id - Supported asset types: Cloud Asset Inventory asset type reference