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é :
-
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.
-
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.
-
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.
-
Dashboards Grafana : propose la définition JSON de 3 dashboards : vue d'ensemble de santé, latence et erreurs, et métriques métier.
-
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.
Personalize this prompt with Léa
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
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
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
- 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
Brand Comment Responses
Consistent and fast social media community management
Complete Code Review for Pull Requests
Get an exhaustive code review covering quality, performance, security, and maintainability for any language.
Master Advanced TypeScript Types
Strengthen your code's type safety with advanced generics, utility types, and discriminated unions.
Perplexity Prompt for Generating Python Code
Perplexity AI stands out from other AI assistants with its unique ability to combine real-time web search and code generation. When it comes to producing Python code, this advantage is significant: Perplexity can rely on the latest official documentation, current best practices, and up-to-date libraries to generate reliable and modern code. Unlike a classic LLM whose knowledge is frozen at a cutoff date, Perplexity verifies its sources in real time, drastically reducing the risk of obsolete code or deprecated functions. Whether you are a developer looking to speed up your workflow, a data scientist wanting to prototype quickly, or a beginner learning Python, a well-structured prompt turns Perplexity into a true development assistant. The key lies in the precision of your request: by specifying the technical context, constraints, and expected output format, you get production-ready code rather than a generic snippet. This guide offers optimized prompts to get the most out of Perplexity in your Python projects.