gcp-observability
Skill4 starsChanged 5 months agoMITView on GitHub
Cloud-native observability patterns for GCP using Cloud Monitoring, Cloud Logging, and SLO-based alerting. Use for metrics design, dashboard creation, burn-rate alerting, or implementing SRE practices.
In this repository101 other files it gives its agents.
- ai-video-understandingSkill
- apple-foundation-modelsSkill
- arch-dddSkill
- arch-decision-recordsSkill
- arch-diagramsSkill
- arch-eventsSkill
- arch-mvp-roadmapSkill
- arch-python-modernSkill
- aws-app-runnerSkill
- aws-cicd-patternsSkill
- aws-security-hardeningSkill
- azure-functions-python-v2Skill
- azure-identity-m2m-authSkill
- azure-service-bus-messagingSkill
- azure-workflow-execution-modelsSkill
- caddy-tls-proxySkill
- compliance-frameworksSkill
- design-system-workflowSkill
- dev-debugging-strategiesSkill
- dev-standardsSkill
- docker-python-poetrySkill
- docker-pythonSkill
- fastapi-patternsSkill
- ffmpeg-laravel-videoSkill
- formik-yup-react-nativeSkill
- frontend-accessibilitySkill
- frontend-angular-aiSkill
- frontend-angularSkill
- frontend-angular-toolingSkill
- frontend-design-systemsSkill
- frontend-material-chatSkill
- frontend-material-design-3Skill
- frontend-svelteSkill
- gcp-cicd-patternsSkill
- gcp-cloud-runSkill
- gcp-cloudsql-infrastructureSkill
- gcp-finopsSkill
- gcp-security-hardeningSkill
- github-actions-cicdSkill
- healthkit-biofeedbackSkill
- infra-terraformSkill
- ios-app-qualitySkill
- ios-audio-hapticsSkill
- jest-nestjs-testingSkill
- langchain-azure-openai-patternsSkill
- laravel-auth-hardeningSkill
- laravel-ci-mysqlSkill
- laravel-mix-webpackSkill
- laravel-modern-patternsSkill
- laravel-pint-patternsSkill
- laravel-s3-storageSkill
- laravel-sail-dockerSkill
- mobile-app-deploymentSkill
- mobile-e2e-testingSkill
- mobile-offline-syncSkill
- mobile-push-notificationsSkill
- mobile-video-uploadSkill
- mongodb-asyncmongoclient-patternsSkill
- mongodb-atlas-patternsSkill
- nestjs-patternsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 60
Every SLO should have two alerts:
- Very specific: line 84
Use JSON with consistent fields — unstructured plain-text logs cannot be filtered by httpRequest.status or labels.service, so log-based …
- Distinctive: line 98
Create metrics from log patterns for alerting:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GCP Observability Patterns
Cloud-native monitoring and alerting patterns following Google SRE practices, emphasizing service-level objectives and error budgets.
Core Services
| Service | Purpose | Use When |
| Cloud Monitoring | Metrics, dashboards, alerts | Performance tracking, SLOs |
| Cloud Logging | Log aggregation, analysis | Debugging, audit trails |
| Cloud Trace | Distributed tracing | Latency analysis |
| Error Reporting | Exception tracking | Application errors |
Note: MQL usability disabled Oct 2024 (new creation blocked July 2025; use PromQL). Alerting pricing starts May 1, 2026 ($0.10/condition, $0.35/1M time series).
SLO Framework
Service Level Indicators (SLIs)
| SLI Type | Measures | Example |
| Availability | Successful requests / total | 99.9% requests succeed |
| Latency | Response time distribution | P95 < 200ms |
| Throughput | Requests per time unit | > 1000 RPS capacity |
| Error Rate | Errors / total requests | < 0.1% 5xx errors |
Service Level Objectives (SLOs)
- Target < 100% (typically 99%, 99.9%, or 99.99%)
- Higher SLO = smaller error budget
- Error budget = 100% - SLO target
SLO: 99.9% availability (3 nines)
Error budget: 0.1% = ~43 minutes/month downtime allowedError Budget
The error budget is your "budget" for acceptable failures:
- Track consumption rate (burn rate)
- Alert when burning too fast
- Slow feature releases when budget low
- Reset at compliance period end
Alerting Strategy
Two-Alert Pattern
Every SLO should have two alerts:
| Alert Type | Purpose | Threshold |
| Fast-burn | Sudden spike, immediate response | Burn rate > 14x (exhausts in 1 hour) |
| Slow-burn | Gradual degradation | Burn rate > 2x (exhausts in 2 weeks) |
Burn Rate Formula
Burn rate = (current error rate) / (error budget rate)
If SLO = 99.9% over 30 days:
- Error budget = 0.1% = 43 minutes
- Budget rate = 43 min / 30 days = 1.43 min/day
If current errors = 10 min/day:
- Burn rate = 10 / 1.43 = 7x (will exhaust in ~4 days)Logging Best Practices
Structured Logging
Use JSON with consistent fields — unstructured plain-text logs cannot be filtered by httpRequest.status or labels.service, so log-based metrics and burn-rate alerts can't be built on them:
{
"severity": "ERROR",
"message": "Request failed",
"httpRequest": {"requestMethod": "POST", "status": 500},
"labels": {"service": "api", "version": "v2"},
"trace": "projects/p/traces/abc123"
}Log-Based Metrics
Create metrics from log patterns for alerting:
- Count specific errors
- Track custom business events
- Bridge logs to monitoring
Key Trade-offs
- SLO before alerting - Alerts without defined objectives fire on noise, not budget exhaustion
- Actionable alerts only - Non-actionable alerts train responders to ignore the queue
- Structured logs - Unstructured plain-text logs cannot be filtered by field, so log-based metrics and burn-rate alerts cannot be built on them
- Trace correlation - Missing trace IDs across services makes cross-service latency root-causing impossible
- Dashboard hierarchy - Flat dashboards mix signal levels; Overview → Service → Component keeps triage fast
- Environment naming - Staging services typically have
-stagingsuffix (e.g.,gateway-service-staging). Verify actual service names withgcloud run services listbefore creating queries/dashboards — assumed names produce empty dashboards that look healthy.
Monitoring AI Services
RAG Hallucination Detection
For AI assistants using RAG, monitor entity grounding rate:
Metrics:
- Entity grounding rate (% responses with only known entities)
- Hallucination detection rate (invented entities caught)
Cloud Logging Filter (example):
resource.type="cloud_run_revision"
jsonPayload.assistant_response =~ "Chillax Cruiser|Adventure Seeker|invented_entity_pattern"
severity>=WARNINGAlert: Hallucinated entity detected → Slack #ai-quality
Why: LLMs may invent plausible entities despite correct knowledge base. Active monitoring catches production hallucinations before customers see them.
See reference.md for detailed configurations and examples.md for alerting policies.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

