Back to blog
Engineering
7 min read

Debug in Production Faster with the Right Signals

How to go from 45 minutes of guesswork in production to 10 minutes of targeted diagnosis: the signals, tools, and reflexes that make the difference.

Paul Thiberville

Lead Developer

December 10, 2025

Three in the morning. Your alerting system just woke you up: payment error rate jumped from 0.2% to 8%. The team gathers on a call, everyone's blocked for the next 45 minutes, with zero leads.

The thing is, bugs aren't what's expensive. It's the tiny gap between "something's wrong" and "we know exactly where to look."

The best teams we've worked with didn't resolve incidents faster because they had better developers. They resolved them faster because they captured the right signals from the start.

Why Your Logs Tell You Nothing

Most applications have logs. The problem is most logs are useless.

At 3am, what you want isn't 50 lines of "DEBUG: entering function X". What you want are the 3 lines that tell you in 30 seconds whether the problem is your code, an external dependency, or a traffic spike.

An actionable log tells a story: user X tried action Y, system Z responded with status W. A useless log is "execution complete" or "loop number 47".

Signal typeUseful exampleUseless exampleTime saved
Transaction log"user_id=12345 action=payment amount=99.99 status=timeout""Debug: processing"5-10 min
Structured error"error=TIMEOUT code=GATEWAY_UNAVAILABLE retry_count=3""Error occurred"10-15 min
Correlation"trace_id=abc123 parent_span=payments child_span=stripe_charge"Separate logs per module15-30 min
System metric"cpu=78% memory=2.1GB requests/s=450""Everything ok"5-20 min

Timing isn't anecdotal. In 2024, MTTR (mean time to resolution) for teams without observability was 67 minutes. For teams with structured observability, 12 minutes. That's it. 55 minutes saved on every incident.

👉 Before adding a log, ask yourself: "At 3am, would this log help me pick between three hypotheses?" If the answer is no, keep it for local debugging.

Three Levels of Observability That Change Everything

Level 1: Structured logs. Every important event (incoming request, API call, error, completed transaction) becomes a JSON line with context. No filler. Just facts: user, action, result, duration, trace ID.

Teams that master this level go from "there's an error somewhere" to "the error is a timeout loading invoices" in under 5 minutes.

Level 2: Distributed traces. A user request flows through multiple services (API → database → async worker → email service). A trace ID follows it everywhere. You can see a request started at 14:23:45.123, waited 2s on the database, then 8s on email, then crashed. No guessing. You see it.

Teams at level 2 cut their MTTR another 40-50%. They spot bottlenecks without manually profiling for hours.

Level 3: Business metrics + smart alerting. You don't just monitor "the API responds", you monitor "conversion rate", "average order processing time", "how many users are blocked right now". Alerts aren't "CPU > 80%" but "payment error rate increased 5x in 5 minutes".

Level 3 is what separates reactive teams from predictive ones. You see problems before your users do.

How to Structure Logs Without Building a Factory

The temptation is to add 150 fields to every log. Result: more logs, but the signal stays drowned.

Here's what actually works. Four tiers:

Required: timestamp, level (ERROR/WARN/INFO), service, message. It's bare bones, but it's the foundation.

Highly recommended: user_id, request_id (or trace_id), action, status, duration in ms. At this point, you can say "request 12345 failed after 3 seconds" without knowing any code details.

If it failed: specific error, stack trace, external response codes (ex: "stripe returned 402"), business context (ex: plan="premium", account_age_days=45). Context turns a generic error into an actionable clue.

Optional but useful: code version, region, user experience (ex: "A/B variant=new_checkout"). This helps isolate whether the bug affects everyone or just some users.

"The best observability adds only 15-20% log volume, but saves 75% of diagnostic time."

Alerts That Actually Matter (And How to Avoid False Alarms)

A team gets roughly 150 alerts per week. If 140 are false alarms, the 150th goes unnoticed. That's why good teams have fewer alerts, not more.

AlertClassic threshold (trap)Intelligent thresholdReal frequency
"High CPU"CPU > 80%CPU > 85% FOR 5min + requests/s declining1 per month
"Error detected"error_count > 1error_rate > 2% OR error_count > 5 in last minute2-3 per week
"High latency"p95 > 1sp95 > 2s + users blocked > 1001-2 per week
"Slow database"query_time > 100msquery_time > 500ms on critical transaction1-2 per month
"Payment failed"failed_transactions > 0failed_payment_rate > 1% OR failure_type=TIMEOUT1 per week max

The trick: the best alerts don't wake you for a single problem. They wake you for a pattern: "Error X increased 50% in 10 minutes" or "Payments are taking 3x longer than usual".

👉 If you get an alert and your first action is to ignore it, delete it. It's not helping you, it's distracting you.

Incident Response in Practice: The 15 Minutes That Matter

When things break, every minute counts. Here's what separates teams that lose an hour from teams that fix it in 15 minutes:

Minutes 0-2 (triage): alert lands, someone glances at the real-time dashboard. Three questions: real impact? (how many users? which service?) is it known? (have we seen this before?) absolute urgency or can we wait 5 min for more data?

At this point, you activate an incident room if needed. Efficient teams have a "health check" dashboard they consult in under 30 seconds. If it's all green, probably a phantom alert. If it's red, it's a real problem.

Minutes 2-7 (hypotheses): team assembled (3-4 people max), you have 5 minutes to surface 2-3 testable hypotheses based on: recent deployments, structured logs, distributed traces, infra changes. Each hypothesis must be testable in under 1 minute (ex: "check if timeout is from Stripe").

Teams without observability brainstorm here. Teams with observability see data and eliminate hypotheses one by one.

Minutes 7-12 (fix): once you know the cause, it's: quick mitigation (rollback, kill requests, config change) or longer fix? Most of the time you can contain damage in 3-5 minutes (ex: stop workers causing the leak, revert config, throttle problematic requests).

After minute 12 (retro): once users are stable, you're ahead of schedule. Document fast: exact timeline, logs that helped, logs that were missing, alarms that could have caught it earlier. The retro doesn't need to be long: 15 minutes of notes while it's fresh.

"A well-observed incident lasts 15 minutes. A poorly observed incident lasts 2 hours and you learn nothing."

The Minimal Toolkit That Works

You don't need Datadog + Jaeger + Prometheus + Loki + 47 proprietary tools.

Here's what covers 90% of teams:

  • Structured logs: CloudWatch (AWS), Stackdriver (GCP), Loki (open-source), or even PostgreSQL if you don't have better. JSON + basic queries goes a long way.
  • Traces: Jaeger (open-source) or AWS X-Ray. Cheap, not complicated to integrate.
  • Metrics: Prometheus (open-source, on your machines) or CloudWatch. A dashboard with 8-10 business metrics is enough.
  • Alerting: anything that talks to your logging system can alert. PagerDuty is luxury, a simple Slack integration works fine.

The key isn't the tool. It's discipline: four mandatory fields per log, one trace per user request, three business metrics tracked continuously, zero useless alerts.

Result: The 60-Minute Shortcut

A team we worked with:

  • Before (no observability): 67 minutes average MTTR, 3-4 critical incidents per month
  • After 2 months (structured logs only): 35 minutes
  • After 4 months (logs + traces): 18 minutes
  • After 6 months (logs + traces + smart alerts): 9 minutes

No hacks. Just observability designed from the start as an internal product, not a "nice to have".

Those 60 minutes saved per incident are 1 hour of team energy per month (for 2-3 incidents). Multiply that by 52 weeks. It becomes 50-100 hours of useful work per year, simply because you have the right signals.

👉 Start small: adopt structured logs this week. Traces next month. Smart alerts in 2-3 months. Teams that iterate on observability always end up sharper than those trying to do everything at once.

If you have production incidents and don't know where to start, we can help you frame the right signals. Usually 2-3 weeks of focused work to save months of hours burned on guessing.

Let’s talk about your project

A web or mobile application to launch, or a product to accelerate?
Book 30 minutes to align on the right next step, without wasting cycles.
See our work