Set Up Application Observability
Implement the three pillars of observability (logs, metrics, traces) with OpenTelemetry, Prometheus, and Grafana dashboards.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
You are an SRE (Site Reliability Engineering) expert specializing in the observability of distributed systems. I need to set up the three pillars of observability for my application.
Application to instrument:
- Type: [e.g. Node.js API, Python microservices, Go application]
- Infrastructure: [e.g. Kubernetes, Docker Compose, simple VPS]
- Traffic volume: [e.g. 10k requests/minute]
- Current stack: [e.g. no monitoring, Sentry only, basic logs]
Tools available or desired:
- Logs: [e.g. Loki + Grafana, ELK Stack, Datadog]
- Metrics: [e.g. Prometheus + Grafana, CloudWatch, Datadog]
- Traces: [e.g. Jaeger, Zipkin, Tempo, Datadog APM]
Set up the three pillars of observability:
-
Structured logging: implement JSON logging with standard fields (timestamp, level, service, trace_id, user_id, duration). Define the log levels and when to use each one. Avoid useless logs that drown out the important ones.
-
Prometheus metrics: instrument the key business metrics (order success rate, revenue per hour) and technical metrics (P95/P99 latency, error rate, resource usage). Provide the instrumentation code.
-
Distributed tracing with OpenTelemetry: configure the OpenTelemetry SDK, instrument the HTTP routes and database calls, and propagate the trace context between services.
-
Grafana dashboards: provide the JSON definition of 3 dashboards: health overview, latency and errors, and business metrics.
-
Alerts: define relevant alerting rules with thresholds based on SLOs (Service Level Objectives) and the error budget.
Personalize this prompt with Léa · AI assistant
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
This prompt structures observability according to the three industry-recognized pillars (logs, metrics, traces), ensuring complete system visibility: logs for error context, metrics for trends and alerts, and traces for understanding inter-service interactions. The distinction between technical and business metrics is fundamental for product teams: knowing that P99 latency is 500ms is useful for engineering, but knowing that order success rate dropped 5% is critical information for the business. Both types of metrics must coexist. Adopting OpenTelemetry for tracing is a wise strategic choice as it's the open-source standard that avoids vendor lock-in: the same instrumentation code can send traces to Jaeger, Tempo, or Datadog as needed, without modifying application code.
Use Cases
Expected Output
Complete configuration of all three pillars with instrumentation code, Grafana dashboards, and SLO-based alert rules.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
Be the first to comment on this prompt.
Glossary Terms
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Improve this prompt with the Optimizer
Analyze the prompt, strengthen the context and get a more precise version.
Claude Prompts
Structure, context and examples to get better answers from Claude.
AI prompts for web developers
Code review and debugging, keeping API keys and secrets out of the prompt.
Security, GDPR & Business Plans
ChatGPT Business, Claude Team, Gemini Workspace and Mistral Vibe compared from vendor sources: training, EU hosting and a GDPR checklist.
Similar Prompts
Task brief for Claude Code: frame a feature end to end
Brief template to delegate a complete feature to Claude Code: goal, starting point, constraints, definition of done, working rules and recap format.
Write a project's CLAUDE.md: the brief Claude Code reads at every session
Turns your project description into a dense CLAUDE.md: commands, structure, conventions, pitfalls, off-limits areas and situations where the agent must ask before acting.
Design a Secure Webhook API
Design a webhook API with event subscriptions, signed deliveries, retry limits, and a delivery log your support team can inspect.
Generate Storybook Stories for UI Components
Generate Storybook stories for a UI component, with visual variants, interactive controls, interaction tests, and MDX documentation.