ThinkWithPrompt by SynotticThinkWithPrompt

Add useful logging, metrics, and tracing to a service

Plans the instrumentation a service needs so you can answer what broke, where, and for whom when something goes wrong.

Software DevelopmentFew-ShotStandardData & AnalyticsCodingCodeFill-in Template

The prompt

Help me add observability to a service. Service purpose: [WHAT IT DOES] Stack: [LANGUAGE, FRAMEWORK, HOW IT'S DEPLOYED] Observability tools: [e.g. "OpenTelemetry", "Datadog", "Prometheus + Grafana", "CloudWatch", "none yet"] Key code paths: [PASTE HANDLERS OR DESCRIBE MAIN FLOWS] Questions I can't answer today: [e.g. "why some requests are slow", "which customer is affected"] Produce: 1. Logs: what to log at each level (error, warn, info, debug), a structured log format with standard fields (timestamp, level, request/trace ID, user or tenant ID, operation, duration, outcome), and what must never be logged (passwords, tokens, full card numbers, personal data). 2. Metrics: for each main flow, the RED metrics (rate, errors, duration) plus resource and business metrics worth tracking. Name each metric, its type (counter, gauge, histogram), and labels. Warn about high-cardinality labels like user IDs. 3. Traces: which spans to create, what attributes to attach, and how to propagate context across HTTP calls, queues, and background jobs. 4. Code examples: instrumentation for 1-2 of my code paths in my stack. 5. Dashboard: the 6-8 panels to put on the service's main dashboard. Prioritize: label each item "do first", "next", or "nice to have", so I can ship value in a day rather than boiling the ocean.

Highlighted [brackets] are blanks to replace with your own details.

Fill in the blanks and use this promptMore Software Development prompts

What to fill in

  • WHAT IT DOES
  • LANGUAGE, FRAMEWORK, HOW IT'S DEPLOYED
  • PASTE HANDLERS OR DESCRIBE MAIN FLOWS

How this prompt is built

This prompt follows the Few-Shot structure (Few-shot prompting). A few-shot prompt includes one or more worked examples of the input and the output you want, so the model can copy the pattern instead of guessing it.

Related prompts

Find more prompts like this