> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/integrations/destinations/google-cloud-storage.md).

# Google Cloud Storage

The Google Cloud Storage destination exports telemetry from a Bindplane pipeline as [OTLP JSON](https://github.com/open-telemetry/opentelemetry-proto#otlpjson) objects written to a Google Cloud Storage (GCS) bucket. It supports logs, metrics, and traces. Objects are written under a time-partitioned path within the bucket (and optional folder), with an optional prefix and optional gzip compression.

### Supported Telemetry

| Metrics | Logs | Traces |
| ------- | ---- | ------ |
| ✓       | ✓    | ✓      |

### Prerequisites

This destination writes objects to a Google Cloud Storage bucket using a Google service account.

* **A Google Cloud project** and a **pre-created GCS bucket**. Bucket names in GCS are globally unique. The destination can create a bucket if it does not exist, but creating it ahead of time avoids name collisions with buckets owned by other organizations, which would otherwise fail with `403 Forbidden` on write. See [Creating buckets](https://cloud.google.com/storage/docs/buckets).
* **A service account with permission to write objects to the bucket.** At minimum, grant the **Storage Object Creator** role (`roles/storage.objectCreator`), which includes `storage.objects.create`, on the bucket or project. If you let the destination create the bucket on first use, the service account also needs bucket-create permission (for example, the **Storage Admin** role, `roles/storage.admin`). See [IAM roles for Cloud Storage](https://cloud.google.com/storage/docs/access-control/iam-roles).
* **Credentials reachable by the collector.** Use Application Default Credentials (`auto`), an inline service-account JSON key (`json`), or a path to a service-account key file on the collector host (`file`). See [Authentication](https://cloud.google.com/docs/authentication#oauth2).

### Configuration

<figure><img src="/files/kjViBEAAEEhVP2NcTq8T" alt="Bindplane docs - Google Cloud Storage - image 1"><figcaption></figcaption></figure>

**Destination**

| Parameter       | Type               | Required | Default               | Description                                                                                            |
| --------------- | ------------------ | -------- | --------------------- | ------------------------------------------------------------------------------------------------------ |
| Telemetry Types | Telemetry Selector | No       | Logs, Metrics, Traces | Which signals to export to GCS.                                                                        |
| Bucket Name     | String             | Yes      | *(empty)*             | Name of the bucket to store objects in. Must be globally unique.                                       |
| Folder Name     | String             | No       | *(empty)*             | An optional folder to put the objects in. Can be a nested folder path.                                 |
| Project ID      | String             | No       | *(empty)*             | The ID of the Google Cloud project the bucket belongs to. Read from the credentials if not configured. |

**Authentication**

| Parameter             | Type                   | Required | Default   | Description                                                                                                                                                                                             |
| --------------------- | ---------------------- | -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authentication Method | Enum: auto, json, file | No       | auto      | The method used for authenticating to Google Cloud. `auto` uses Application Default Credentials; `json` uses an inline key; `file` reads a key file on the collector.                                   |
| Credentials           | String                 | Yes \*   | *(empty)* | JSON value from a Google service account credential file. Sensitive. Shown and required when Authentication Method is `json`.                                                                           |
| Credentials File      | String                 | Yes \*   | *(empty)* | Path to a Google service account credential file on the collector system. The collector's runtime user must have permission to read this file. Shown and required when Authentication Method is `file`. |

\* Required only for the matching Authentication Method.

**Bucket Creation**

These values are only used when the destination creates the bucket.

| Parameter       | Type                                        | Required | Default  | Description                                                                                                                                                                            |
| --------------- | ------------------------------------------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Bucket Location | Enum (creatable)                            | No       | US       | The location of the bucket. Multi-region (`US`, `EU`, `ASIA`), dual-region, and regional values are accepted. See [Bucket locations](https://cloud.google.com/storage/docs/locations). |
| Storage Class   | Enum: STANDARD, NEARLINE, COLDLINE, ARCHIVE | No       | STANDARD | The storage class of the bucket. See [Storage classes](https://cloud.google.com/storage/docs/storage-classes).                                                                         |

**Advanced**

| Parameter     | Type               | Required | Default   | Description                                                                                  |
| ------------- | ------------------ | -------- | --------- | -------------------------------------------------------------------------------------------- |
| Granularity   | Enum: minute, hour | No       | minute    | Time granularity of timestamps in the object path.                                           |
| Compression   | Enum: none, gzip   | No       | none      | The type of compression applied to the data before sending it to storage.                    |
| Object Prefix | String             | No       | *(empty)* | An optional prefix to prepend to the object file name.                                       |
| Timeout       | Integer (seconds)  | No       | 30        | The maximum amount of time to wait for a batch to be sent to the destination.                |
| Drop Raw Copy | Boolean            | No       | true      | When enabled, the raw copy of the log stored in `log.record.original` is dropped. Logs only. |

**Retry on Failure**

| Parameter               | Type              | Required | Default | Description                                                                                                                    |
| ----------------------- | ----------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Enable Retry on Failure | Boolean           | No       | true    | Attempt to resend telemetry data that has failed to be transmitted to the destination.                                         |
| Initial interval        | Integer (seconds) | No       | 5       | Time to wait after the first failure before retrying. Shown when retry is enabled.                                             |
| Max interval            | Integer (seconds) | No       | 30      | The upper bound on backoff. Shown when retry is enabled.                                                                       |
| Max elapsed time        | Integer (seconds) | No       | 300     | The maximum amount of time spent trying to send a batch, used to avoid a never-ending retry loop. Shown when retry is enabled. |

**Sending Queue**

| Parameter                 | Type      | Required | Default                          | Description                                                                                                                                                              |
| ------------------------- | --------- | -------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Enable Sending Queue      | Boolean   | No       | true                             | Buffer telemetry data temporarily before sending to help ensure telemetry is not lost during a temporary network outage.                                                 |
| Number of Consumers       | Integer   | No       | 10                               | Number of consumers that dequeue batches. Shown when the sending queue is enabled.                                                                                       |
| Queue Size                | Integer   | No       | 5000                             | Maximum number of batches kept in memory before dropping. Shown when the sending queue is enabled.                                                                       |
| Enable Persistent Queuing | Boolean   | No       | true                             | Buffer telemetry data to disk before sending to help ensure telemetry is not lost during network outages or collector restarts. Shown when the sending queue is enabled. |
| Persistent Queue Storage  | Extension | Yes      | file\_storage\_persistent\_queue | The storage to use for the persistent queue. Shown when both the sending queue and persistent queuing are enabled.                                                       |

### Examples

#### Export all signals to a bucket with gzip compression

This configuration exports logs, metrics, and traces to the bucket `prod-telemetry-archive`. The project ID is read from the credentials. Objects are written under a folder and object prefix and compressed with gzip.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Destination
metadata:
  name: google-cloud-storage
spec:
  type: googlecloudstorage
  parameters:
    - name: telemetry_types
      value:
        - Logs
        - Metrics
        - Traces
    - name: bucket_name
      value: prod-telemetry-archive
    - name: folder_name
      value: otel
    - name: auth_type
      value: file
    - name: credentials_file
      value: /etc/otel/gcs-sa.json
    - name: bucket_location
      value: US
    - name: bucket_storage_class
      value: STANDARD
    - name: compression
      value: gzip
    - name: object_prefix
      value: bindplane_
```

With this configuration, object paths in GCS look like:

```
otel/year=2026/month=06/day=18/hour=18/minute=00/bindplane_logs_{random_id}.json.gz
otel/year=2026/month=06/day=18/hour=18/minute=00/bindplane_metrics_{random_id}.json.gz
otel/year=2026/month=06/day=18/hour=18/minute=00/bindplane_traces_{random_id}.json.gz
```

### Configuration Tips

* Pre-create the bucket and grant the service account `roles/storage.objectCreator`. Letting the destination create the bucket requires broader permissions (bucket-create) and risks a `403` on a globally taken name.
* Bucket Location and Storage Class only apply when the destination creates the bucket. For an existing bucket they are ignored, so set them in GCS instead.
* Use `gzip` compression to reduce GCS storage cost and egress for archived telemetry. Set Granularity to `hour` to write fewer, larger objects when per-minute partitioning is too granular.

### Troubleshooting

#### Writes fail with 403 Forbidden

Symptoms: objects are not written and the collector logs `403 Forbidden`.

Solutions:

1. Confirm the service account has `roles/storage.objectCreator` (or equivalent) on the target bucket or project.
2. If the bucket does not yet exist and you expect the destination to create it, the name may be taken by another organization (names are globally unique). Pre-create the bucket under a unique name and set Bucket Name to match.

#### Authentication errors

Symptoms: the collector cannot authenticate to Google Cloud.

Solutions:

1. For Authentication Method `file`, verify the path is correct on the collector host and the collector's runtime user can read it.
2. For `json`, confirm the pasted credential is valid service-account JSON. For `auto`, confirm Application Default Credentials are available in the collector's environment.

#### Dropped data during outages

Symptoms: telemetry is lost during network interruptions or collector restarts.

Solutions:

1. Keep the sending queue enabled and enable Persistent Queuing so batches survive restarts.
2. Increase Queue Size if batches are dropped under sustained backpressure, and confirm retry on failure is enabled.

### Standalone Destination

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Destination
metadata:
  name: google-cloud-storage
spec:
  type: googlecloudstorage
  parameters:
    - name: telemetry_types
      value:
        - Logs
        - Metrics
        - Traces
    - name: bucket_name
      value: prod-telemetry-archive
    - name: auth_type
      value: file
    - name: credentials_file
      value: /etc/otel/gcs-sa.json
```

### Related Resources

* [Google Cloud Storage Exporter (`googlecloudstorageexporter`)](https://github.com/observIQ/bindplane-otel-collector/blob/main/exporter/googlecloudstorageexporter/README.md)
* [IAM roles for Cloud Storage](https://cloud.google.com/storage/docs/access-control/iam-roles)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bindplane.com/integrations/destinations/google-cloud-storage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
