# AI SRE Google Cloud integration

Connect Google Cloud to give AI SRE read-only access to the logs, metrics, traces, errors, Cloud Run services and GKE clusters of a project during an investigation.

## Connect your project

1. Open [Integrations](https://chat.betterstack.com/team/0/integrations/popular ";_blank") in **AI SRE**.
2. Click **Add** next to **Google Cloud**.
3. Enter your **Google Cloud project ID**.
4. Click **Create integration**.
5. Open [Cloud Shell](https://shell.cloud.google.com ";_blank") as an owner of that project.
6. Run the setup command the integration's page shows.
7. Wait for **Google Cloud project connected** on that page. It usually takes under a minute.

Each integration connects one project. Add another integration for every other project.

## Search logs, metrics and traces

Once connected, AI SRE can read:

-   Logs, metrics and alerting policies.
-   Traces and error groups.
-   Cloud Run services and revisions.
-   GKE clusters and their workloads.

The [setup script](https://github.com/BetterStackHQ/gcp/blob/main/ai-sre-setup.sh ";_blank") is open source. It creates a `betterstack-ai-sre` service account with read access and no service account keys. When you remove the integration, Better Stack shows the command that deletes it again.
