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

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

Tu es un expert SRE (Site Reliability Engineering) spécialisé dans l'observabilité des systèmes distribués. Je dois mettre en place les trois piliers de l'observabilité pour mon application.

Application à instrumenter :

  • Type : [EX: API Node.js, microservices Python, application Go]
  • Infrastructure : [EX: Kubernetes, Docker Compose, VPS simple]
  • Volume de trafic : [EX: 10k requêtes/minute]
  • Stack actuelle : [EX: aucun monitoring, Sentry uniquement, logs basiques]

Outils disponibles ou souhaités :

  • Logs : [EX: Loki + Grafana, ELK Stack, Datadog]
  • Métriques : [EX: Prometheus + Grafana, CloudWatch, Datadog]
  • Traces : [EX: Jaeger, Zipkin, Tempo, Datadog APM]

Mets en place les trois piliers de l'observabilité :

  1. Logging structuré : implémente le logging JSON avec des champs standards (timestamp, level, service, trace_id, user_id, duration). Définis les niveaux de log et quand utiliser chacun. Évite les logs inutiles qui noient les logs importants.

  2. Métriques Prometheus : instrumente les métriques métier clés (taux de succès des commandes, revenus par heure) et techniques (latence P95/P99, taux d'erreur, utilisation des ressources). Fournis le code d'instrumentation.

  3. Tracing distribué avec OpenTelemetry : configure le SDK OpenTelemetry, instrumente les routes HTTP et les appels de base de données, propage le trace context entre services.

  4. Dashboards Grafana : propose la définition JSON de 3 dashboards : vue d'ensemble de santé, latence et erreurs, et métriques métier.

  5. Alertes : définis des règles d'alerte pertinentes avec des seuils basés sur les SLOs (Service Level Objectives) et le budget d'erreur.

100% found this useful

Personalize this prompt with Léa

Answer 3 questions and Léa tailors the prompt to your situation.

Why this prompt works

<p>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.</p><p>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.</p><p>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.</p>

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

  • LéaAI

    Astuce : pour ne pas noyer vos logs, commencez par instrumenter les endpoints critiques uniquement avec OpenTelemetry et activez le sampling adaptatif. Définissez des niveaux de log stricts : `warn` pour les dégradations temporaires, `error` pour les pannes. Ajoutez un middleware pour injecter automatiquement `trace_id` et `span_id` dans vos logs JSON structurés — cela accélère le diagnostique cross-service.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

💻DeveloppementBeginnerAll AIs

Convert CSS to Tailwind

Migrate styling to Tailwind

090
💻DeveloppementIntermediateAll AIs

Refactor legacy code to modern patterns

Gradually modernizing legacy code

0100
💻DeveloppementIntermediateGemini

Gemini Prompt for Generating SQL Queries

Gemini, Google's artificial intelligence model, excels at generating SQL queries through its deep understanding of data structures and database syntax. Whether you are working with MySQL, PostgreSQL, SQL Server or SQLite, Gemini can transform your natural language descriptions into optimized and functional SQL queries. This capability is particularly valuable for developers looking to speed up their workflow, data analysts handling complex datasets, and beginners learning SQL. By providing a well-structured prompt to Gemini, you not only get the desired query but also explanations of the logic used, optimization suggestions, and alternatives based on your database management system. The prompt engineering approach allows you to guide Gemini to take into account your specific constraints: performance, readability, compatibility with a particular DBMS, or adherence to your organization's naming conventions. Discover how to formulate your prompts to get the most out of Gemini in generating SQL queries.

0112
💻DeveloppementIntermediateAll AIs

Implement secrets management

Secure credentials management

0102