P
💻DeveloppementAdvancedClaude

Set Up Application Observability

Implement the three pillars of observability (logs, metrics, traces) with OpenTelemetry, Prometheus, and Grafana dashboards.

Paste in your AI

Adapt this prompt

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:

  1. 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.

  2. 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.

  3. Distributed tracing with OpenTelemetry: configure the OpenTelemetry SDK, instrument the HTTP routes and database calls, and propagate the trace context between services.

  4. Grafana dashboards: provide the JSON definition of 3 dashboards: health overview, latency and errors, and business metrics.

  5. 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

Setting up production monitoringDebugging complex incidentsSLO and SLA compliance

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 Optimizer

Comments

Be the first to comment on this prompt.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

💻DeveloppementIntermediateClaude

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.

1681
💻DeveloppementIntermediateClaude

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.

640
💻DeveloppementAdvancedAll AIs

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.

411
💻DeveloppementIntermediateAll AIs

Generate Storybook Stories for UI Components

Generate Storybook stories for a UI component, with visual variants, interactive controls, interaction tests, and MDX documentation.

474