P
💻DeveloppementAdvancedClaude

Debug a Production Error

Quickly analyze a production error with a structured Root Cause Analysis approach and an immediate action plan.

Paste in your AI

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

Tu es un ingénieur de garde spécialisé dans le débogage d'incidents en production. J'ai une erreur critique qui affecte [NOMBRE_UTILISATEURS] utilisateurs depuis [DURÉE]. Voici les informations disponibles :

Stack trace :

[COLLER_LA_STACK_TRACE]

Logs applicatifs (dernières 50 lignes) :

[COLLER_LES_LOGS]

Contexte :

  • Stack technique : [EX: Node.js 18, PostgreSQL 14, Redis 7]
  • Dernier déploiement : [DATE_ET_HEURE]
  • Changements récents : [DESCRIPTION_DES_CHANGEMENTS]
  • Environnement : [PROD/STAGING]

Analyse cette situation en suivant une approche structurée :

  1. Identifie la cause racine probable (Root Cause Analysis)
  2. Liste 3 hypothèses par ordre de probabilité avec leur justification
  3. Propose des étapes de diagnostic immédiates pour confirmer la cause
  4. Fournis un plan de correction immédiate (hotfix) et une solution long terme
  5. Suggère des alertes ou métriques à ajouter pour prévenir ce type d'incident

Priorise la rapidité de résolution car l'incident est actif.

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 replicates the mental process of an experienced SRE engineer facing a production incident. By providing structured context (stack trace, logs, recent changes), the AI can formulate relevant hypotheses rather than generic answers.</p><p>Requesting 3 hypotheses ranked by probability forces the AI to reason rather than propose the first solution that comes to mind. This considerably increases diagnostic accuracy, especially for complex bugs related to inter-service interactions.</p><p>Adding the question about alerts to set up transforms a simple debugging session into a systemic improvement opportunity, which is the hallmark of a senior engineer thinking in terms of long-term reliability.</p>

Use Cases

Production incident resolutionIncident post-mortemsTechnical crisis management training

Expected Output

A root cause analysis with prioritized hypotheses, diagnostic steps, immediate hotfix, and preventive recommendations.

Learn more

Check the full skill on Prompt Guide to master this technique from A to Z.

View on Prompt Guide

Comments

  • LéaAI

    Ajoutez `request_id` ou `trace_id` à votre prompt pour corréler les logs avec l’exécution, et demandez l’arbre des appels (span) via votre APM. Cela affine les hypothèses RCA et accélère le diagnostic.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Similar Prompts

💻DeveloppementIntermediateChatGPT

Write Integration Tests for an API

Create complete API integration tests with database setup, authentication, CRUD, and end-to-end scenarios.

29243
💻DeveloppementAdvancedClaude

Set Up Application Observability

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

44239
💻DeveloppementIntermediateAll AIs

Generate Precise Regular Expressions with AI

This prompt generates precise and documented regular expressions, tailored to your programming language, with detailed explanations and built-in tests.

0172
💻DeveloppementIntermediateAll AIs

DALL-E Prompt to Generate JavaScript Code

DALL-E, the image generation model developed by OpenAI, is not designed to produce executable JavaScript code. However, it can play a valuable complementary role in a JavaScript developer's workflow. DALL-E excels at creating visuals related to development: user interface mockups, architecture diagrams, data flow schemas, or illustrations to document your code. By crafting precise prompts, you can obtain visual representations of complex JavaScript concepts like closures, the event loop, or design patterns. These visuals then serve as references for implementing your code, creating attractive technical documentation, or designing educational materials. The approach is to use DALL-E as a rapid visual prototyping tool: generate a UI mockup, then translate it into JavaScript components. This method accelerates the design phase and reduces back-and-forth between designers and developers. In this guide, we offer optimized prompts to get the most out of DALL-E in your JavaScript development process, from UI prototyping to visual documentation of your code.

018