> ## Documentation Index
> Fetch the complete documentation index at: https://docs.steadwing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GCP

> Steadwing connects to Google Cloud Platform to query Cloud Logging, Cloud Trace, and Error Reporting, giving you AI-powered root cause analysis across your GCP infrastructure.

## What does the GCP integration do?

Steadwing reads logs, traces, and errors from your GCP projects to perform AI-powered root cause analysis. During incidents, Steadwing queries Cloud Logging, Cloud Trace, and Error Reporting to identify issues, trace request flows, and analyze error patterns that correlate with production problems.

## Why Use GCP with Steadwing?

<CardGroup cols={2}>
  <Card title="Log Analysis" icon="file-text">
    Access Cloud Logging data to investigate application and infrastructure logs
  </Card>

  <Card title="Distributed Tracing" icon="workflow">
    Analyze request traces to identify latency and performance bottlenecks
  </Card>

  <Card title="Error Tracking" icon="bug">
    Query Error Reporting for exception patterns and error frequencies
  </Card>

  <Card title="Cloud Infrastructure" icon="cloud">
    Correlate incidents with GCP service events and resource states
  </Card>
</CardGroup>

## Benefits

* **Comprehensive Log Access** - Query logs from all GCP services and custom applications
* **Trace-Based Debugging** - Follow request flows across microservices to find root causes
* **Error Pattern Detection** - Identify recurring errors and their distribution
* **Read-Only Access** - Steadwing only reads data, with no write permissions required
* **Multi-Project Support** - Connect multiple GCP projects for unified analysis

## How do I connect GCP to Steadwing?

### Step 1: Create a Service Account

1. Go to the [GCP Console](https://console.cloud.google.com)
2. Select your project
3. Navigate to **IAM & Admin** → **Service Accounts**
   * Direct link: [https://console.cloud.google.com/iam-admin/serviceaccounts](https://console.cloud.google.com/iam-admin/serviceaccounts)
4. Click **+ Create Service Account**
5. Configure the service account:
   * **Service account name:** steadwing-integration
   * **Service account ID:** steadwing-integration (auto-generated)
   * **Description:** Steadwing read-only access for logs, traces, and errors
6. Grant the following read-only roles:
   * **Logs Viewer** (`roles/logging.viewer`)
   * **Cloud Trace Viewer** (`roles/cloudtrace.user`)
   * **Error Reporting Viewer** (`roles/errorreporting.viewer`)
7. Click **Done** to create the service account

<Warning>
  Steadwing only requires read permissions. Do not grant write or admin roles to maintain security.
</Warning>

### Step 2: Connect via Google Authentication

1. Navigate to [Steadwing Integrations](https://app.steadwing.com/integrations)
2. Find the **Google Cloud Platform** integration card
3. Toggle the switch to **Enable** the integration
4. You'll be redirected to Google's authentication page
5. Sign in with your Google account that has access to your GCP project
6. Grant Steadwing the requested read-only permissions
7. You'll be redirected back to Steadwing with the integration connected

## What data does Steadwing pull from GCP?

### Data Collection

Steadwing queries GCP for:

* **Cloud Logging** - Application logs, system logs, audit logs, and custom logs
* **Cloud Trace** - Distributed traces showing request latency and service dependencies
* **Error Reporting** - Error events, stack traces, and error frequency data
* **Resource Metadata** - GCP service information and resource configurations

### Read-Only Operations

All GCP API calls are read-only:

* ✅ Read log entries
* ✅ Query trace data
* ✅ View error reports
* ❌ No write operations
* ❌ No resource modifications
* ❌ No configuration changes

## What permissions does the GCP integration need?

### Required Permissions

The GCP service account requires these read-only roles:

| Role                       | Permission                    | Purpose                           |
| -------------------------- | ----------------------------- | --------------------------------- |
| **Logs Viewer**            | `roles/logging.viewer`        | Read Cloud Logging entries        |
| **Cloud Trace Viewer**     | `roles/cloudtrace.user`       | Access distributed trace data     |
| **Error Reporting Viewer** | `roles/errorreporting.viewer` | Read error reports and statistics |

### Multi-Project Setup

To monitor multiple GCP projects:

1. Ensure your Google account has access to multiple projects
2. Authenticate once through the Steadwing integrations page
3. Select which projects you want to grant Steadwing access to during the OAuth flow

## FAQs

<AccordionGroup>
  <Accordion title="Does Steadwing require write permissions to GCP?">
    No, Steadwing only requires read-only access. The integration uses Logs Viewer, Cloud Trace Viewer, and Error Reporting Viewer roles, which provide no write capabilities.
  </Accordion>

  <Accordion title="Do I need to create a service account?">
    Yes, you need to create a service account in your GCP project with the appropriate read-only roles. After that, authentication is handled automatically through Google's OAuth flow when you toggle the integration in Steadwing.
  </Accordion>

  <Accordion title="Can Steadwing modify my GCP resources or logs?">
    No, the required permissions are strictly read-only. Steadwing cannot modify logs, delete traces, change configurations, or alter any GCP resources.
  </Accordion>

  <Accordion title="What Google account should I use to authenticate?">
    Use a Google account that has access to your GCP projects. The account should have permissions to view the resources that the service account has been granted access to.
  </Accordion>

  <Accordion title="Does this count against my GCP API quotas?">
    Yes, API calls made by Steadwing count toward your GCP project quotas. The integration is optimized to make minimal calls, typically only during active incident analysis.
  </Accordion>

  <Accordion title="Can I connect multiple GCP projects?">
    Yes, during the OAuth authentication flow, you can select multiple projects to grant Steadwing access to. Your Google account must have appropriate permissions for each project.
  </Accordion>

  <Accordion title="How do I revoke Steadwing's access to GCP?">
    To revoke access, go to your [Google Account permissions page](https://myaccount.google.com/permissions), find Steadwing, and remove access. You can also toggle off the integration in Steadwing Settings.
  </Accordion>
</AccordionGroup>

Need additional help? Please reach out to us at [hello@steadwing.com](mailto:hello@steadwing.com)
