
Google Cloud Run is a fully managed serverless platform that runs containers on demand. It scales to zero when not in use and scales automatically to handle traffic. While Cloud Run manages the infrastructure, your containerised application can still fail — and monitoring is essential for production services.
External HTTP monitoring catches most of these from the user's perspective.
Configure an uptime monitor on your Cloud Run service URL:
Monitor: https://your-service-name-xxxxx-uc.a.run.app
(or your custom domain: https://yourapp.com)
Expected status: 200
Interval: 1 minute
Monitoring the custom domain is preferable — it tests the complete path including DNS, load balancing, and SSL termination, not just the Cloud Run service itself.
# FastAPI example
@app.get("/health")
async def health():
return {"status": "ok"}
// Express example
app.get('/health', (req, res) => {
res.json({ status: 'ok' });
});
// Go example
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(`{"status":"ok"}`))
})
Cloud Run supports startup probes and liveness probes for containers:
# cloudbuild.yaml or service configuration
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: my-service
spec:
template:
spec:
containers:
- image: gcr.io/my-project/my-app
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 0
periodSeconds: 10
startupProbe:
httpGet:
path: /health
port: 8080
failureThreshold: 3
periodSeconds: 10
These internal probes restart unhealthy containers. External monitoring confirms user-facing availability after internal recovery.
Cloud Run integrates with Google Cloud Monitoring for native metrics:
Key Cloud Run metrics:
run.googleapis.com/request_count — requests per secondrun.googleapis.com/request_latencies — response time distributionrun.googleapis.com/container/instance_count — active instancesrun.googleapis.com/container/cpu/utilizations — CPU usageSet up alerting policies in Cloud Monitoring:
gcloud alpha monitoring policies create \
--policy-from-file=uptime-policy.json
Cloud Run scales to zero by default — cold starts add 1-3 seconds to the first request. For latency-sensitive applications, configure minimum instances:
gcloud run services update my-service \
--min-instances=1 \
--region=europe-west1
One minimum instance eliminates cold starts for most traffic patterns. Monitor response time in your uptime monitoring tool to detect cold start impact.
Cloud Run provides SSL automatically for the .run.app domain. For custom domains (mapped via Cloud Run Domain Mappings or Cloud Load Balancing):
SSL monitor: yourapp.com
Alert at: 30 days remaining
Cloud Run manages certificates for mapped domains, but failures can occur. SSL certificate monitoring provides advance warnings.
Cloud Run supports traffic splitting between revisions (blue-green / canary deployments). After deploying a new revision:
External monitoring on your service URL validates the combined experience across all revisions receiving traffic.
Monitor your Cloud Run services from outside Google's network at Domain Monitor.
Generative AI creates new content — text, images, code, and more. This guide explains how it works, what tools are available, and where it's genuinely useful versus overhyped.
Read moreCursor AI is an AI-powered code editor built on VS Code. Learn what it does, how it works, and whether it's the right tool for your development workflow.
Read moreClaude Opus is Anthropic's most capable AI model, built for complex reasoning and demanding tasks. Learn what it does, how it compares, and when to use it.
Read moreLooking to monitor your website and domains? Join our platform and start today.