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.
Why this prompt works
<p>This prompt reproduces 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 responses.</p><p>The request for 3 hypotheses ranked by probability forces the AI to reason rather than propose the first solution that comes to mind. This significantly increases diagnostic accuracy, especially for complex bugs related to interactions between services.</p><p>Adding the question about alerts to implement transforms a simple debugging session into an opportunity for systemic improvement, which is the hallmark of a senior engineer thinking in terms of long-term reliability.</p>
Use Cases
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 GuideGlossary Terms
Similar Prompts
Learn the basics of Git for beginners
Learn Git from scratch with illustrated explanations, concrete examples, a practical workflow and a cheatsheet of essential commands.
Implement robust error handling in Node.js
Create a professional Node.js error handling architecture with custom error classes, centralized middleware and monitoring.
Define a Git strategy for a team
Define a comprehensive Git strategy adapted to your team: branching model, conventions, code review and release management.
Write integration tests for an API
Create comprehensive API integration tests with database setup, authentication, CRUD and end-to-end scenarios.