Grafana Cloud

Google Cloud logs

Collect logs from Google Cloud with a Cloud Logging sink, Pub/Sub, and Grafana Alloy. Configure a log sink to select the Cloud Logging entries you want to export and send them to a Pub/Sub topic. A subscription makes those messages available to Alloy. Alloy uses a Google Cloud service account with permission to read the subscription, then forwards the logs to Grafana Cloud. The log sink filter controls which entries enter the pipeline. You can adjust the filter to collect the log types that matter to your monitoring needs.

How GCP logs collection works
How GCP logs collection works

Before you configure

The account that creates the sink, topic, and subscription needs the roles/logging.configWriter and roles/pubsub.editor IAM roles. The service account Alloy uses needs the roles/pubsub.subscriber role on the subscription. For the full prerequisites and setup steps, refer to Configure GCP logs.

View GCP logs

After you configure log collection, open the Logs tab in Cloud Provider Observability to view your GCP logs.

Next steps