AutoMerge is generally available

Last updated:

Set Up Google Cloud Integration

Configure the Dash0 GCP integration to collect infrastructure metrics from Cloud Monitoring.

The Dash0 GCP integration creates a read-only service account and a custom role in each GCP project you connect. Dash0 then collects data by impersonating that service account. For the exact identities, permissions, and APIs, see Identities and Permissions.

Prerequisites

Before you begin, ensure you have:

  • A GCP project with billing enabled
  • The permissions the setup needs in each project you connect. roles/owner includes all of them. The setup needs these permissions:
    • serviceusage.services.enable
    • iam.roles.create, iam.roles.update, and iam.roles.undelete
    • iam.serviceAccounts.create, iam.serviceAccounts.getIamPolicy, and iam.serviceAccounts.setIamPolicy
    • resourcemanager.projects.getIamPolicy and resourcemanager.projects.setIamPolicy
Note

You do not need to enable any APIs in advance. The setup enables the APIs listed in Google APIs, and leaves APIs that are already enabled as they are.

Integration Setup

Follow these steps to connect your GCP projects to Dash0 and begin collecting infrastructure metrics.

1. Navigate to Integration Settings

In Dash0, go to Settings from the left sidebar, then select Integrations from the organization settings menu or click here to go there directly.

Select Google Cloud Platform from the available integrations.

Organization settings showing Integrations menu

2. Authorize Dash0 Access

Click Add to begin setting up a new GCP integration.

In the integration setup dialog, click Connect with Google to begin the OAuth authorization flow.

Add GCP Integration dialog with Connect with Google button

You'll be redirected to Google to sign in and grant permissions.

Google Sign in screen for Dash0 Integration

Dash0 requests the cloud-platform scope, but uses your Google token only during the setup. The setup:

  • Creates a custom role that can only search Cloud Asset Inventory and read Cloud Monitoring metrics.
  • Grants the role to a read-only service account it creates in your project.
  • Lets Dash0 impersonate the read-only service account. After the setup, Dash0 reads your project only through this account.

3. Select Projects

After authorization, choose which GCP projects to monitor from your GCP organization.

Select the projects you want to monitor and assign them to datasets. You can add or remove projects at any time from the integration settings.

GCP projects selected with dataset assignments

Click Connect projects to complete the setup. Dash0 will configure the integration and verify access to your projects.

Setting up your GCP integration progress screen

Dash0 discovers supported resources in the selected projects and collects metrics for enabled resource types.

Note

Newly added resource types are added in a disabled state by default and must be manually enabled. This prevents unexpected increases in billing when new monitoring capabilities are released.

4. Verify Metrics Collection

Within 5 to 10 minutes of setup, metrics should begin appearing in Dash0. Navigate to Infrastructure > Google Cloud to verify that your services are being monitored.

Google Cloud infrastructure view showing Cloud Run services

You can view detailed telemetry data for each service:

Cloud Run service telemetry view with metrics

The overview tab provides comprehensive monitoring dashboards:

Cloud Run service overview with detailed metric panels

The Metadata tab shows the service configuration and resource attributes:

Cloud Run Metadata tab showing service configuration and resource attributes

If metrics don't appear, check the troubleshooting section below.

Managing Resource Types

You can control which GCP resource types Dash0 monitors by enabling or disabling them individually. When a resource type is disabled, Dash0 continues to discover and display those resources, but stops collecting metrics for them and does not bill you for the related discovery processes.

Enabling a Resource Type

If you visit a GCP infrastructure page for a disabled resource type, you'll see a banner indicating that metrics collection is disabled:

Banner showing resource type is disabled with enable button

To enable metrics collection, click the Enable button in the banner. Metrics will begin flowing within 2 minutes.

Disabling a Resource Type

To disable metrics collection for a resource type:

  1. Navigate to Settings > Integrations > Google Cloud Platform or click here to go there directly
  2. Select the integration you want to modify
  3. In the resource types list, toggle off the resource type you want to disable

GCP integration settings showing resource type toggles

Disabling a resource type stops metrics collection but preserves historical data. Resources of that type will still appear in the infrastructure views, but no new metrics will be collected.

Tip

Use resource type controls to manage monitoring costs. If you have GCP resources that don't require active monitoring, disabling their metrics collection can reduce your Dash0 data ingestion.

Choose individual metrics

An organization admin can change metric selection in Settings > Integrations > Google Cloud Platform. Open a connected project and select Metrics, then choose a resource type and search for the metrics you need.

  • Core metrics are required while collection is enabled for that resource type. They are locked and cannot be deselected individually.
  • Default metrics are collected initially, but you can deselect them.
  • Optional metrics are not collected initially. Select them when you need the additional measurements.

Metric selection applies only while collection is enabled for the resource type. Turning collection off keeps the selection for when you enable it again.

Scope collection to specific resourcesRelease historyThis feature was introduced by More Google Cloud Service metric support and precise control over them on September 7, 2026.

Where the Metrics tab displays expandable resource cards, expand a type to review its resources and metrics. Click Turn on if collection is off, choose metrics, and click Save to apply the draft changes. The Modified tag marks unsaved edits. To stop an enabled type, use its Disable metric collection action and confirm Disable collection.

If the card includes Conditions, click Add filter to restrict collection to matching resources, for example a particular cluster or service. Without conditions, all resources of that enabled type are in scope. Review the Monitored and Not monitored counts before saving. The counts preview the draft conditions; collection does not change until you click Save.

The resource-card layout and conditions are available where enabled for your organization. If you see the resource-type selector and metric table instead, use their collection toggles and metric checkboxes. Resource conditions are not available in that layout.

Identities and Permissions

Use this section to review what the integration can access, or to write organization policies and perimeter rules for it.

Identities

  • Dash0 service account: gcp-integration@dash0-production.iam.gserviceaccount.com. It has no roles in your project. It can only impersonate the read-only service account.
  • Read-only service account: dash0-readonly-<SUFFIX>, displayed as Dash0 Read Only SA. The setup creates one in each project you connect, so its email ends in @<PROJECT_ID>.iam.gserviceaccount.com.
  • Your Google account: The account you sign in with at Connect with Google. Dash0 uses its token only while the setup runs.

<SUFFIX> comes from your Dash0 organization ID, so it is the same in every project you connect from that organization, and it does not change if you remove the integration and connect the project again. To get the exact email, open IAM & Admin → Service accounts in a connected project and look for Dash0 Read Only SA.

Custom Role

The setup creates a custom role named Dash0 Read Only in the project, with the ID dash0ReadOnly_<ORG_ID>. It has three permissions:

  • cloudasset.assets.searchAllResources: Finds the supported resources in the project.
  • monitoring.metricDescriptors.get: Reads metric metadata.
  • monitoring.timeSeries.list: Reads metric data points.

IAM Bindings

The setup adds two bindings:

  • Project IAM policy: Grants the custom role to the read-only service account.
  • Read-only service account IAM policy: Grants roles/iam.serviceAccountTokenCreator to the Dash0 service account, which lets Dash0 impersonate the read-only service account.

If you run the setup again for the same project, it reuses the service account and updates the custom role. It also restores the role if someone deleted it and Google Cloud can still recover it. It does not add duplicate bindings.

Google APIs

The setup enables these APIs in your project:

  • cloudasset.googleapis.com
  • cloudresourcemanager.googleapis.com
  • iam.googleapis.com
  • monitoring.googleapis.com
  • serviceusage.googleapis.com

Dash0 calls them as two different identities:

  • During setup, with your Google token: Cloud Resource Manager lists your projects, checks your permissions, and adds the project-level binding. Service Usage enables the APIs. IAM creates the custom role and the read-only service account, and adds the impersonation binding.
  • During verification and collection, as the Dash0 service account impersonating the read-only service account: iamcredentials.googleapis.com issues short-lived tokens for the read-only service account. Dash0 uses those tokens to check the role's permissions through Cloud Resource Manager, find resources through Cloud Asset Inventory, and read metrics from Cloud Monitoring.

VPC Service Controls

If your project is inside a VPC Service Controls perimeter, the perimeter blocks Dash0's calls until you add ingress rules for them. You need two rules:

  • A temporary rule for the setup: The setup runs with the token of the person who clicks Connect with Google. Let that user call cloudresourcemanager.googleapis.com, iam.googleapis.com, and serviceusage.googleapis.com, and remove the rule when the setup finishes.
  • A permanent rule for collection: Let the Dash0 service account and the read-only service account call iamcredentials.googleapis.com, cloudresourcemanager.googleapis.com, cloudasset.googleapis.com, and monitoring.googleapis.com. Dash0 checks access right after the setup, so add this rule before you click Connect projects.

This ingress policy file contains both rules. Replace <SETUP_USER_EMAIL>, <SUFFIX>, <PROJECT_ID>, and <PROJECT_NUMBER> with your values:

yaml
# Temporary: remove this rule after the setup completes.
- title: dash0-integration-setup
  ingressFrom:
    identities:
      - user:<SETUP_USER_EMAIL>
    sources:
      - accessLevel: "*"
  ingressTo:
    operations:
      - serviceName: cloudresourcemanager.googleapis.com
        methodSelectors:
          - method: "*"
      - serviceName: iam.googleapis.com
        methodSelectors:
          - method: "*"
      - serviceName: serviceusage.googleapis.com
        methodSelectors:
          - method: "*"
    resources:
      - projects/<PROJECT_NUMBER>
# Permanent: required for verification, resource discovery, and metrics collection.
- title: dash0-integration-collection
  ingressFrom:
    identities:
      - serviceAccount:gcp-integration@dash0-production.iam.gserviceaccount.com
      - serviceAccount:dash0-readonly-<SUFFIX>@<PROJECT_ID>.iam.gserviceaccount.com
    sources:
      - accessLevel: "*"
  ingressTo:
    operations:
      - serviceName: iamcredentials.googleapis.com
        methodSelectors:
          - method: "*"
      - serviceName: cloudresourcemanager.googleapis.com
        methodSelectors:
          - method: "*"
      - serviceName: cloudasset.googleapis.com
        methodSelectors:
          - method: "*"
      - serviceName: monitoring.googleapis.com
        methodSelectors:
          - method: "*"
    resources:
      - projects/<PROJECT_NUMBER>

Apply the file with gcloud access-context-manager perimeters update <PERIMETER_NAME> --set-ingress-policies=<FILE> --policy=<POLICY_ID>. The --set-ingress-policies flag replaces every ingress rule on the perimeter, so merge these rules into your existing ones first.

Note

These rules accept calls from any network (accessLevel: "*") and limit access by identity. If a call is still blocked, the VPC Service Controls audit log entry shows the identity, service, and method the perimeter denied.

Connecting a project in Dash0 always runs the setup. You cannot create the read-only service account, custom role, and bindings yourself, for example with Terraform, and then connect the project.

Domain Restricted Sharing

If your organization enforces domain restricted sharing, the setup creates the custom role and the read-only service account, then fails on the impersonation binding. The Dash0 service account belongs to Dash0's Google Cloud organization, which your policy does not allow. Dash0 shows Setup failed. Please try again. for the project.

The fix depends on which constraint your organization enforces. Prefer the managed constraint where you can, because it can allow the Dash0 service account alone.

  • iam.managed.allowedPolicyMembers: Add the Dash0 service account to allowedMemberSubjects, with the serviceAccount: prefix. A project-level policy for this constraint replaces the parent policy's parameters, so copy the parent's allowedPrincipalSets and allowedMemberSubjects into it as well.
  • iam.allowedPolicyMemberDomains: Add Dash0's Google Workspace customer ID, C04b4lvt4, to the allowed values. This allows every account in Dash0's Google Workspace, not only the Dash0 service account, so set it only on the projects you connect rather than on the whole organization.

This project-level policy for iam.allowedPolicyMemberDomains keeps the values inherited from the parent and adds Dash0's customer ID:

yaml
name: projects/<PROJECT_ID>/policies/iam.allowedPolicyMemberDomains
spec:
  inheritFromParent: true
  rules:
    - values:
        allowedValues:
          - is:C04b4lvt4

Apply a policy with gcloud org-policies set-policy <FILE>, then connect the project again. The setup reuses the custom role and the service account it already created.

Collector-Based Setup (Alternative)

If you prefer to use the OpenTelemetry Collector for metrics collection (for example, when running the Collector in your own GKE cluster), you can configure the googlecloudmonitoringreceiver receiver:

yaml
receivers:
  googlecloudmonitoringreceiver:
    collection_interval: 1m
    project_id: YOUR_GCP_PROJECT_ID
    metrics_list:
      - metric_name: "run.googleapis.com/container/cpu/utilizations"
      - metric_name: "run.googleapis.com/request_count"
      # ... additional metrics

exporters:
  otlp/dash0:
    endpoint: YOUR_DASH0_ENDPOINT
    auth:
      authenticator: bearertokenauth/dash0

extensions:
  bearertokenauth/dash0:
    scheme: Bearer
    token: ${DASH0_AUTH_TOKEN}

service:
  extensions: [bearertokenauth/dash0]
  pipelines:
    metrics:
      receivers: [googlecloudmonitoringreceiver]
      exporters: [otlp/dash0]
Tip

When running the Collector on GKE, use Workload Identity to bind a Kubernetes service account to a GCP service account with roles/monitoring.viewer. This eliminates the need for service account key files. See the Workload Identity documentation for setup details.

Troubleshooting

If you encounter issues with the GCP integration, the following solutions address common setup and configuration problems.

Metrics Not Appearing

If metrics don't appear after setup:

  • Check API enablement: Verify that the APIs listed in Google APIs are enabled in your GCP project
  • Verify billing: Ensure billing is active on your project (Cloud Monitoring requires billing beyond the free tier)
  • Confirm permissions: Check the custom role and both bindings described in Identities and Permissions
  • Check VPC Service Controls: If the project is inside a service perimeter, check that the perimeter allows the calls listed in VPC Service Controls
  • Check resource existence: Verify that the services you expect to monitor (Cloud Run, Pub/Sub, etc.) are actually deployed and generating metrics

Missing Specific Services

If some services appear but others don't:

  • Region selection: Confirm you've selected the correct regions in the integration settings
  • Resource filters: Check if any filters are active that might exclude certain resources
  • Recent deployments: Newly created resources may take up to 5 minutes to appear

Permission Errors

If you see permission errors during setup:

  • IAM role propagation: IAM changes can take up to 5 minutes to propagate. Wait and retry.
  • Organization policies: If the project shows Setup failed. Please try again., check whether your organization enforces domain restricted sharing. See Domain Restricted Sharing
  • VPC Service Controls: If the project shows Blocked by a VPC Service Controls policy, add the ingress rules described in VPC Service Controls
  • Project-level access: Ensure you have permission to grant IAM roles at the project level

Next Steps