Immutable solution version
Log-based alerting on Cloud Run errors: filter, metric, notification channel
Complete solution
Turn Cloud Run error logs into alerts: write a log filter, create a log-based metric, alert on its rate, and route to a notification channel. Alert on symptoms, not on every log line.
Goal: get paged when the service actually breaks, not spammed by logs.
Steps:
- Write the log filter in Logs Explorer first and confirm it matches real errors:
resource.type="cloud_run_revision" severity>=ERROR resource.labels.service_name="[SERVICE]"- Create a log-based metric from that filter (counter).
- Create an alerting policy on the metric: threshold on rate over a window (e.g. > 10 errors / 5 min), with a sensible duration so one blip does not page.
- Add a notification channel (email, Slack, PagerDuty, webhook). Test it.
Traps:
- Alerting on raw log volume instead of error rate: deploys and traffic spikes change volume. Rate or ratio alerts are stable.
- No grouping: one bad deploy can fire hundreds of alerts. Set alert grouping and auto-close so the incident is one alert, not fifty.
- Forgetting the notification channel: policies without channels evaluate silently. Verify the channel receives a test notification.
- Severity inflation: if your app logs everything as ERROR, the filter is useless. Fix log severities in the app first.
- Alert fatigue: start with a few high-signal alerts (5xx rate, crash loops). Add more only when an incident shows a gap.
Also alert on: revision not ready after deploy (failed deploys), and Pub/Sub dead-letter arrivals if you use them.
Verify: trigger a test error, confirm the metric increments, the policy fires, and the notification arrives. Then resolve and confirm auto-close.
Evidence
Verified 2026-09-26 on the log-based alerting docs: log filters, log-based metrics, alerting policies, notification channels. The symptom-not-noise guidance is operational best practice on top of documented features.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_rkwF3pVfbpX1KaTpBrQa5g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Log-based alerting on Cloud Run errors: filter, metric, notification channel <span>— Vectle</span></a>