Cloud Run for Anthos allows you to run stateless containers on Anthos GKE on Google Cloud, on-premises and multi-cloud environments. Cloud Run is serverless: it enables you to run requests or event-driven stateless workloads without having to worry about servers. It abstracts away all infrastructure management such as provisioning, configuring, and managing servers, so you focus only on writing code. To learn more about Cloud Run click here.
In this post, we’ll provide an overview of how to collect Cloud Run container logs and metrics, and send them to Sumo Logic to:
- Monitor the health of pods and containers that host your Cloud Run applications
- Monitor and troubleshoot Cloud Run applications running on Anthos GKE on Google Cloud, on-prem and or cloud clusters
How does it work?
As part of our Kubernetes and GKE monitoring solution, Sumo Logic integrates metrics and logs for Kubernetes clusters via FluentD, FluentBit, Prometheus, Falco, and Stackdriver for GKE control plane logs.
This process automatically brings in logs for Cloud Run components via our FluentBit plugin and metrics via Prometheus as shown in the diagram below:
![](https://assets-www.sumologic.com/application-content/metrics_logs_for_kubernetes_clusters.png)
- FluentBit, which runs as a DaemonSet, collects Cloud Run container and telemetry logs
- Prometheus, which runs as a deployment, scrapes Cloud Run container metrics.
- FluentD plugin receives Cloud Run container logs and metrics from FluentBit and Prometheus respectively, parses and formats these logs and metrics, and enriches them with metadata that then gets sent to a Sumo Logic HTTP Source.
How to get started?
To get started, first setup the Sumo Logic Kubernetes app and the GKE App to collect and monitor logs, metrics and events on Anthos GKE clusters.
The Sumo Logic Kubernetes App’s dashboard shows Cloud Run Container resource utilization and errors by pods and containers that allow you to take the necessary steps to optimize your deployment.
The dashboard also allows you to drill down into Cloud Run container application logs to troubleshoot any Cloud Run application issues as shown below:
![](https://assets-www.sumologic.com/application-content/kubernetes_namespace_overview.png)
With the Sumo Logic dashboard for Cloud Run, you can monitor key performance indicators around the health and performance of Cloud Run applications including latency, request count, and traffic volume.
![](https://assets-www.sumologic.com/application-content/gcp_cloud_run.png)
The Latency (ms) by Service panel helps you monitor the latency of Cloud Run applications.
In the screenshot below, we see a sudden spike in the number of bytes served which is directly correlated with an increase in latency for the checkout service.
From Latency (ms) by Service panel, you can observe that the latency of the checkout service is consistently higher than that of other Cloud Run applications. This indicates you may want to allocate more resources to the checkout service.
![](https://assets-www.sumologic.com/application-content/traffic_volume_and_bytes_saved.png)
The Avg Latency (ms) by Request URL panel allows you to optimize the performance of your webpages by identifying the slowest URLs as shown below:
Summary
In this post, we have shown an overview of how you can monitor and troubleshoot applications running on Cloud Run for Anthos using the Sumo Logic integration. The integration allows you to:
- Collect container logs and metrics from Cloud Run for Anthos
- Monitor the health of pods and containers that host your Cloud Run applications
- Monitor and troubleshoot Cloud Run applications running on Anthos GKE on Google Cloud, on-prem and or cloud clusters by leveraging the Sumo Logic Cloud Run dashboard
Next Steps
If you don’t yet have a Sumo Logic account, sign up for a free trial.
To get started with our Cloud Run Dashboard check out the Sumo Logic Cloud Run Dashboard.
Complete visibility for DevSecOps
Reduce downtime and move from reactive to proactive monitoring.