Observability plan: structured logs, metrics, traces and alerts
Design observability for your backend: SLOs per user journey, a structured log schema, RED and USE metrics, OpenTelemetry tracing, useful alerts and cost control. Designed for ChatGPT, Claude, Gemini and Microsoft Copilot. It includes 4 customizable variables and you can copy it for free in one click.
Intermediate · Text · Pending editorial review
Prompt
Act as an SRE who designs observability for small and mid-sized teams.
Context:
- System and components: {{system}}
- Stack and languages: {{stack}}
- Preferred tooling: {{tooling}}
- Recent incidents or pain points: {{incidents}}
Deliverables:
1. Three to five critical user journeys and, for each, a measurable SLI and a proposed SLO with its error budget. Mark the targets as proposals to validate with the business.
2. A structured JSON log schema: mandatory fields (timestamp, level, service, environment, trace and request id, pseudonymized user, event), when to use each level and what must never be logged (passwords, tokens, full personal data).
3. Metrics: the RED method for services (rate, errors, duration) and USE for resources (utilization, saturation, errors), with names, labels and warnings about high-cardinality labels.
4. Distributed tracing with OpenTelemetry: what to auto-instrument and what to instrument by hand, context propagation across services and queues, and a sampling strategy.
5. Alerts: based on symptoms and error budget burn rate, not every cause; for each alert, severity, who gets paged and a link to its runbook. A list of alerts worth deleting or downgrading.
6. Dashboards: one overview per service and one per critical journey, with the specific charts.
7. Retention and cost: how long to keep each signal, sampling, and how to keep the bill from exploding.
8. Sample code for my stack: middleware that adds a request id, structured logs and a latency metric.
9. A 30, 60 and 90-day rollout plan.
Constraints:
- Do not invent traffic volumes or tool prices: use [FILL IN] and explain how to estimate them.
- If key information is missing, ask me before proposing SLOs.
- Prioritize what would have helped detect or resolve the incidents I described sooner.How to use it
- Describe your services, queues and databases, and the latest incidents that were hard to detect.
- Say whether you prefer self-hosted open source, a SaaS, or your cloud provider's tools.
- Roll out structured logs and trace ids first, then metrics and SLO-based alerts.
Usage example
System: Django API, Celery worker, PostgreSQL and Redis on Kubernetes · Tooling: self-hosted open source · Incident: the queue stalled for two hours and nobody noticed until customers called.
Sample output
1. Critical journeys and SLOs (proposals to validate with the business)
| Journey | SLI | Proposed SLO |
|---|---|---|
| Log in | % of requests returning 2xx in < 500 ms | 99.5% over 28 days |
| Place an order | % of requests without a 5xx | 99.9% |
| Background task | % of tasks that start < 60 s after being enqueued | 99% |
The third one is what would have caught the incident: the queue did not "fail", it simply stopped moving.
5. Top-priority alert: stalled Celery queue
- alert: CeleryQueueStalled
# The metric name depends on the exporter you pick: [FILL IN]
expr: max(celery_queue_oldest_task_age_seconds) > 300
for: 5m
labels:
severity: page
annotations:
summary: "Oldest task has been waiting for more than 5 min"
runbook: "https://wiki.internal/runbooks/celery-queue-stalled"
Alert on the symptom (age of the oldest task), not a cause (worker CPU, Redis connections), because it covers every reason the queue might get stuck.
Alerts worth downgrading to tickets
- Node CPU > 80% with no latency impact.
- Isolated pod restarts that recover on their own…
Key facts
- Category
- Programming & development · DevOps
- Output type
- Text
- Level
- Intermediate
- Designed for
- ChatGPT, Claude, Gemini and Microsoft Copilot
- Verified in
- Pending editorial verification
- Variables
- System and components, Stack and languages, Preferred tooling and Recent incidents
- Language
- English
- Price
- Free, no sign-up
- Updated
- Nov 7, 2026
Frequently asked questions
What is the difference between an SLI and an SLO?
The SLI is the measurement (for example, the percentage of checkout requests that succeed in under 500 ms). The SLO is the target for that measurement over a period, such as 99.5% over 30 days.
Why alert on symptoms instead of causes?
Cause-based alerts (high CPU, a restarted pod) are noisy and often do not affect users. Alerting when users suffer, or when the error budget burns fast, cuts on-call fatigue.
What is this prompt for?
Design observability for your backend: SLOs per user journey, a structured log schema, RED and USE metrics, OpenTelemetry tracing, useful alerts and cost control.
Which AI tools does it work with?
It is designed for ChatGPT, Claude, Gemini and Microsoft Copilot. We have not verified it in these tools yet, so results may vary between them.
How do I customize the prompt?
Click “Customize” and fill in the variables (System and components, Stack and languages, Preferred tooling and Recent incidents). The text updates instantly and you can then copy it in one click. Values are stored only in your browser.
Do I need experience to use it?
It is intermediate: it helps to know the topic so you can provide good context and review the result critically.
Is this prompt free?
Yes. Every HomeCasa Prompts prompt is free, with no sign-up or subscription. You can also use them in professional projects.
Can I trust the AI output?
Treat it as a high-quality draft: always check data, figures and important claims before publishing or making decisions.