Viewing Logs and Monitoring Dashboards
Logging, metrics, dashboards and a baseline set of alerts are provisioned for you. There are no agents to install and no collectors to configure. Everything below is in Cloud Logging and Cloud Monitoring, in the GCP project for the environment you care about.
Finding your application's logs
Logs from Cloud Run, GKE and Compute Engine are collected and indexed automatically. In Logs Explorer, filter by resource type:
# Cloud Run service
resource.type="cloud_run_revision"
resource.labels.service_name="your-application-name"
# GKE container
resource.type="k8s_container"
resource.labels.project_id="your-gcp-project-id"
resource.labels.container_name="your-application-name"
# Compute Engine VM (collected by the Ops Agent)
resource.type="gce_instance"
resource.labels.instance_id="your-vm-instance-id"
Write your application logs to stdout or stderr as structured JSON. Cloud
Logging parses it into jsonPayload, so you can filter on your own fields —
jsonPayload.userId="..." — instead of grepping message text.
Dashboards
Dashboards are created per project and named with a standard prefix, so they sort together:
[Project Name] - GKE Cluster Health[Project Name] - Cloud Run Service Performance[Project Name] - [Database Name] - Performance[Project Name] - [Ingress Name] - Load Balancer Metrics
They cover CPU and memory utilisation and instance counts; request latency, error rates and traffic volume; and database connection counts, query throughput and CPU.
Alerting
A baseline set of alerts is configured on your resources — high error rate,
excessive latency, resource exhaustion. Notifications go to the stakeholders
named in the project's permissions block, so the people who receive them are
the ones you declared there. You do not configure these, but they are active:
expect to hear from them.