# Error Spike Investigation: A First Look at the Cause

Source: https://maito.app/workflows/investigate-an-error-spike

When errors jump, Maito checks your logs and error tracker, finds the likely cause and posts options in Slack before anyone opens a laptop.

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

[Engineering](https://maito.app/workflows/team/engineering) · [Software](https://maito.app/workflows/industry/software) · When something happens · Updated October 19, 2026

Works with

-   Slack
-   Email
-   [Datadog](https://maito.app/workflows/tool/datadog)
-   [Sentry](https://maito.app/workflows/tool/sentry)
-   [New Relic](https://maito.app/workflows/tool/new-relic)
-   [Grafana](https://maito.app/workflows/tool/grafana)

## 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

**Maito** (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):

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

**Maito** (3:01 AM):

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

## 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

### What starts the investigation?

An alert from your monitoring tool through a webhook, or a mention in Slack. You can also have it check every few minutes.

### Will it roll back a deploy on its own?

No. It lists options like a rollback or a patch and waits for a person to choose.

### What if the cause is unclear?

It says so, lists what it checked and what it ruled out, and gives the on-call engineer a shorter starting point.

## More engineering workflows

-   [Turn a ticket into a tested pull request Hand over a well-scoped ticket and get back a pull request with tests. Engineering · When you ask Works with Linear, Jira.](https://maito.app/workflows/turn-a-ticket-into-a-tested-pull-request)
-   [Review a teammate's pull request Get a first review that catches bugs and missed cases before a person looks. Engineering · When something happens Works with Slack, Email.](https://maito.app/workflows/review-a-teammates-pull-request)
-   [Check a change for security problems Look at a change for injection, leaked secrets and missing permission checks. Engineering · When you ask Works with Slack, Email.](https://maito.app/workflows/check-a-change-for-security-problems)
-   [Write the changelog Twice a week, turn merged pull requests into a changelog people can read. Engineering · On a schedule Works with Slack, Email.](https://maito.app/workflows/write-the-changelog)
-   [Nudge stale pull requests Pull requests waiting too long get a polite reminder to the right reviewer. Engineering · On a schedule Works with Slack, Email.](https://maito.app/workflows/nudge-stale-pull-requests)
-   [File a bug from a Slack thread When a bug comes up in chat, mention Maito and it gets filed once, with details and no duplicates. Engineering · When you ask Works with Linear, Jira.](https://maito.app/workflows/file-a-bug-from-a-slack-thread)

[See all workflows](https://maito.app/workflows)

## Put your AI teammate to work.

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

[Put Maito to work](https://maito.app/login?returnTo=%2Fworkflows%2Finvestigate-an-error-spike)[Book a demo](mailto:support@maito.app?subject=Maito%20demo)
