Last updated: May 7, 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.
Equality Rules
GCP resources are identified using service-specific attributes that uniquely identify each resource instance.
- Google Cloud Run:
cloud.platform == "gcp_cloud_run"+cloud.account.id+cloud.region(orcloud.availability_zone) +faas.name. All instances of the same Cloud Run service in the same region and account are grouped together. Alternatively, can be identified bycloud.provider == "gcp"+cloud.resource_idmatching//run.googleapis.com/...pattern. - Google Cloud Pub/Sub:
cloud.provider == "gcp"+cloud.resource_id(Pub/Sub resource identifier matching//pubsub.googleapis.com/...pattern) - Google Cloud Storage:
cloud.provider == "gcp"+cloud.resource_id(bucket resource identifier matching//storage.googleapis.com/...pattern)
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. GCP services can be identified either through platform-specific equality rules (Cloud Run using faas.name) or through the generic cloud.resource_id pattern matching approach (for Pub/Sub, Cloud Storage, and as an alternative for Cloud Run).
Naming Rules
GCP resource names are derived from service-specific attributes that provide human-readable identification.
| Condition | Name |
|---|---|
cloud.platform == "gcp_cloud_run" + faas.name set | <faas.name>:<cloud.region> or <faas.name> |
cloud.resource_id matches //pubsub.googleapis.com/... | Resource name extracted from cloud.resource_id |
cloud.resource_id matches //storage.googleapis.com/... | Bucket name extracted from cloud.resource_id |
cloud.resource_id matches //run.googleapis.com/... | Service/job name extracted from cloud.resource_id |
Typing Rules
GCP resource types are assigned based on the cloud.platform attribute or cloud.resource_id pattern.
| Condition | Type | UI Label |
|---|---|---|
cloud.platform == "gcp_cloud_run" | gcp.cloud.run | Cloud Run |
cloud.resource_id matches //run.googleapis.com/... | gcp.cloud.run | Cloud Run |
cloud.resource_id matches //storage.googleapis.com/... | gcp.cloud.storage | Cloud Storage |
cloud.resource_id matches //pubsub.googleapis.com/... | gcp.pubsub | Pub/Sub |
Examples
- Cloud Run Service: For a service named
api-servicein regionus-central1, the name will beapi-serviceand typegcp.cloud.run - Pub/Sub Topic: For
cloud.resource_id = //pubsub.googleapis.com/projects/my-project/topics/events-topic, the name will beevents-topicand typegcp.pubsub - GCS Bucket: For
cloud.resource_id = //storage.googleapis.com/my-data-bucket, the name will bemy-data-bucketand typegcp.cloud.storage
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_idfor Pub/Sub topics and Cloud Storage buckets to enable resource correlation
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