Investigate an error spike

When errors jump, get a first look at the cause before anyone opens a laptop.

Engineering · Software · When something happens · Updated

Works with

How do you investigate an error spike?

To investigate an error spike, run a Loop in Maito that starts from your monitoring alert. It compares the error rate with normal, reads the logs and error tracker in Datadog, Sentry, New Relic or Grafana, links the spike to the recent deploy, and posts the likely cause with options in your on-call channel.

How it's done today

On-call engineer starts from scratch at 2am.

What Maito does

  1. Read the alert
  2. Check recent deploys, logs and errors
  3. Suggest the likely cause and fix

Example

Loop run: Datadog alert · Checkout 5xx above 5% for 5 min

oncall
Maito APP 2:52 AM

Checkout errors are at 9.4% (normal is 0.3%). They began at 2:41 AM, 10 minutes after deploy 4.12 went out. Likely cause: Sentry shows 1,284 events of one error, TypeError: cannot read 'country' of null, in tax/calculateTax.ts line 77. That code came in with PR #868. Catch: it only hits guest checkouts, which have no customer record. Logged-in checkouts are fine, which is why it passed testing. Options: • Roll back to 4.11 • Patch: a 3-line null check, ready on branch fix/tax-null-customer, tests passing I haven't rolled back or deployed anything. Alex, your call.

Alex 2:58 AM

@Maito rolling back now. Open the patch as a PR for the morning.

Maito APP 3:01 AM

PR #911 is open with a guest-checkout test. It's not merged.

Example complete

How to set it up

When something happens Investigate an error spike
Ask your agent

“When Datadog alerts that checkout errors are above 5% for 5 minutes, look into it and post what you find in #oncall. Check recent deploys, Sentry and the code. Don't roll anything back.”

Connect logs
  • Datadog
  • Sentry
  • New Relic
  • Grafana
Connect error tracker
  • Sentry
  • Datadog

Not connected yet? Your agent sends you a link to sign in.

What it won't do

It reads what your monitoring tools record. A cause that leaves no trace in logs or errors will be reported as unknown, not guessed.

Questions

More engineering workflows

See all workflows

Put your AI teammate to work.

Set it up in minutes. Start with this one, and let it earn the next one.