Profiler Retention with GCS

The Kloudfuse Profiler Retention feature allows you to store profiling data in Google Cloud Storage (GCS) for long-term retention and analysis. This configuration enables you to specify a GCS bucket as the backend storage destination for profiler data, keeping detailed performance insights available beyond the default retention period. To use this feature, you need a GCP service account with appropriate permissions and its associated JSON key file.

Prerequisites

  1. Create a GCP service account with access to the GCS bucket.

  2. Download the JSON key file for the service account,

Configure Profiler

Add the necessary GCP GCS configuration to store profiles to the config section of the custom-values.yaml file.

pyroscope:
  pyroscope:
    config: |
      storage:
        backend: gcs (1)
        gcs:
          bucket_name: your-gcs-bucket-name (2)
          service_account: | (3)
            {
              "type": "service_account",
              "project_id": "your-project-id",
              "private_key_id": "your-private-key-id",
              "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
              "client_email": "your-service-account-email@your-project-id.iam.gserviceaccount.com",
              "client_id": "your-client-id",
              "auth_uri": "https://accounts.google.com/o/oauth2/auth",
              "token_uri": "https://oauth2.googleapis.com/token",
              "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
              "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-service-account-email%40your-project-id.iam.gserviceaccount.com",
              "universe_domain": "googleapis.com"
            }
yaml
1 backend: Set to gcs.
2 bucket_name: Name of your GCS bucket
3 service_account: JSON key file for your GCP service account