---
title: "GCP Cloud Logging data source | Grafana Labs"
description: "Query GCP Cloud Logging with a Grafana data source."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# GCP Cloud Logging data source

[![GCP Cloud Logging data source: Query GCP logs directly from Grafana](cp-olly-gcp-logging-ds-light.svg)](cp-olly-gcp-logging-ds-light.svg "GCP Cloud Logging data source: Query GCP logs directly from Grafana")

Authenticate with a service account JSON key, the VM’s service account when Grafana runs on Compute Engine, or (Grafana Cloud only) Workload Identity Federation with your OIDC provider. You write queries in Cloud Logging’s query language. GCP uses two separate data sources. Configure Cloud Monitoring for metrics and Cloud Logging for logs. The same service account can serve both if you grant it the Monitoring Viewer, Logs Viewer, and Logs View Accessor roles and enable the Cloud Resource Manager API.

## What you get

- GCP service logs
- Filter by project and bucket
- Template variables
- Logs-to-traces

## Considerations

- Cloud Logging query syntax
- API latency
- Separate from metrics data source
- Per-project authentication, typically
- No alerting on this data source; use log-based metrics with the Cloud Monitoring data source

## Documentation

View the [Cloud Logging data source](/grafana/plugins/googlecloud-logging-datasource/) documentation.
