# Google Cloud Storage

### Supported Types

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

### Notes

​The Google Cloud Storage destination saves telemetry as [OTLP JSON](https://github.com/open-telemetry/opentelemetry-proto#otlpjson) objects in Google Cloud Storage.

1. The destination will create a bucket if it doesn't exist. Bucket names in GCS are *globally* unique, so if any organization contains a bucket with the given name, it will fail to create and will likely return `403 Forbidden` codes when it tries to write. You can manually create the bucket in GCS to ensure the name is not taken. [More info, here](https://cloud.google.com/storage/docs/buckets).
2. Your credentials must have the Storage Admin permission to create buckets, folders, and objects.

### Configuration

| Parameter              | Type                | Default               | Description                                                                                                                           |
| ---------------------- | ------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| telemetry\_types\*     | `telemetrySelector` | Logs, Metrics, Traces | Specifies which types of telemetry to export.                                                                                         |
| bucket\_name\*         | `string`            | ""                    | The name of the bucket to store objects in. Must be globally unique.                                                                  |
| project\_id            | `string`            | ""                    | The ID of the Google Cloud project the bucket belongs to. Will be read from credentials if not configured.                            |
| auth\_type             | `enum`              | auto                  | The method used for authenticating to Google Cloud. Valid values are "auto", "json", or "file".                                       |
| credentials            | `string`            | ""                    | JSON value from a Google Service Account credential file. Required if auth\_type is "json".                                           |
| credentials\_file      | `string`            | ""                    | Path to a Google Service Account credential file. Required if auth\_type is "file".                                                   |
| bucket\_location       | `enum`              | US                    | The location of the bucket. Only used during bucket creation. [More info](https://cloud.google.com/storage/docs/locations)            |
| bucket\_storage\_class | `enum`              | STANDARD              | The storage class of the bucket. Only used during bucket creation. [More info](https://cloud.google.com/storage/docs/storage-classes) |
| partition              | `enum`              | minute                | The granularity of the timestamps in the object path, either "minute" or "hour".                                                      |
| compression            | `enum`              | none                  | The compression algorithm to use when exporting telemetry, either "none" or "gzip".                                                   |
| folder\_name           | `string`            | ""                    | An optional folder to put the objects in. Can be a nested folder path.                                                                |
| object\_prefix         | `string`            | ""                    | An optional prefix to prepend to the object file name.                                                                                |

<mark style="color:red;">\*</mark>*<mark style="color:red;">required field</mark>*

### Supported Retry and Queuing Settings

This destination supports the [retry settings](https://docs.bindplane.com/configuration/bindplane-otel-collector/retry-on-failure), the [sending queue settings](https://docs.bindplane.com/configuration/bindplane-otel-collector/sending-queue), and the [persistent queue settings.](https://docs.bindplane.com/configuration/bindplane-otel-collector/persistent-queue)

| Sending Queue | Persistent Queue | Retry on Failure |
| ------------- | ---------------- | ---------------- |
| ✓             | ✓                | ✓                |

### Example Configuration

#### Basic Configuration

For a basic configuration, we specify the `bucket_name` and use the default location and storage class. The project ID will be read from credentials. We update the compression to use `gzip` and we specify a folder name and object prefix.

The object paths in GCS will look like this:

```
test-folder/year=2025/month=03/day=02/hour=06/minute=00/test-prefix_metrics_{random_id}.json.gz
test-folder/year=2025/month=03/day=02/hour=06/minute=00/test-prefix_logs_{random_id}.json.gz
test-folder/year=2025/month=03/day=02/hour=06/minute=00/test-prefix_traces_{random_id}.json.gz
```

**Web Interface**

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2Fgit-blob-dc385cf3e20aff0ac1233ee1736e28be89c044d0%2Fintegrations-destinations-google-cloud-storage-image-1.png?alt=media" alt="Bindplane docs - Google Cloud Storage - image 1"><figcaption></figcaption></figure>

**Standalone Destination**

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Destination
metadata:
  id: googlecloudstorage
  name: googlecloudstorage
spec:
  type: googlecloudstorage
  parameters:
    - name: telemetry_types
      value: ['Logs', 'Metrics', 'Traces']
    - name: bucket_name
      value: 'test-gcs-basic-configuration-bucket'
    - name: project_id
      value: ''
    - name: auth_type
      value: 'auto'
    - name: bucket_location
      value: 'US'
    - name: bucket_storage_class
      value: 'STANDARD'
    - name: partition
      value: 'minute'
    - name: compression
      value: 'gzip'
    - name: folder_name
      value: 'test-folder'
    - name: object_prefix
      value: 'test-prefix_'
```


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
