Integrate Spike with Tideways
Send Tideways alerts to Spike so a slow response, PHP exception or slow SQL query alerts your on-call team, and resolves when Tideways reports recovery.
Tideways is application monitoring for PHP. It profiles every request, groups the exceptions and the slow SQL queries your code produces, and raises an alert when a project or a single transaction crosses a threshold you configured.
Tideways posts each of those alerts as JSON to a webhook integration. Point it at a Spike integration URL and a response-time breach pages your on-call rotation the moment Tideways opens it, the re-notifications Tideways sends while the breach lasts land on the incident already open instead of paging again, and the incident resolves itself when Tideways says the alert is fixed.
Nothing new is installed on your servers. One webhook integration on the organisation, and one set of notification tickboxes per project, cover every check Tideways runs.
What Spike does with each notification
Every notification Tideways sends arrives on the same webhook, and the top-level type is what tells them apart. Ten types are acted on by name.
Threshold breaches
type
The check in Tideways
What happens in Spike
response_time
The project's response time crossed its threshold
Opens an incident and pages your escalation policy
transaction-response-time
One transaction's response time crossed its threshold
Opens an incident and pages your escalation policy
error_rate
The project's error rate crossed its threshold
Opens an incident and pages your escalation policy
transaction-failure-rate
One transaction's failure rate crossed its threshold
Opens an incident and pages your escalation policy
All four carry a lifecycle in notification.status, and all three of its values are handled on purpose:
notification.status
What it means in Tideways
What happens in Spike
opened
The breach was just raised
Opens an incident and pages your escalation policy
ongoing
Tideways is re-notifying because the breach is still going
Lands on the incident already open and never pages again. If nothing is open — because the opened notification was never delivered — it opens one, since a breach nobody has been told about is a breach somebody should be paged for
closed
Tideways closed the alert because the reading came back under the threshold
Auto-resolves the open incident. Dropped when nothing is open
resolved, ok and cleared are read as closed too.
Exceptions and slow SQL queries
type
The check in Tideways
What happens in Spike
exception
A new, or newly reappearing, PHP error group
Opens an incident and pages your escalation policy
slow-sql
A new slow SQL query group
Opens an incident and pages your escalation policy
An error group has no notification.status — it has a state of its own in notification.error_group.status, which is what Tideways moves when somebody deals with the group:
notification.error_group.status
What happens in Spike
new, open
Still firing. Opens an incident, or lands on the one already open for that group
resolved, not_error, ignored
Auto-resolves the open incident. Dropped when nothing is open
closed, ok and cleared are read as resolved too. Anything else is treated as still firing. An extra incident costs a click; a swallowed alert costs an outage.
Everything else
type
The notification in Tideways
What happens in Spike
missing-data
A service stopped sending data
Opens an incident and pages your escalation policy. A repeat of the same condition lands on it
release
A release was deployed
Opens an incident, or lands on the open one with the same title. Informational — see the hint below
compare_release
Tideways compared a release with the one before it
Titled like a release (Release {name} on {project}), so it lands on that release's incident while it is open. Informational — see the hint below
weekly_report
The week's digest
Titled the same every week, so each report lands on the open report incident, or reopens it once resolved: one incident per project, not one per week. Informational — see the hint below
A type Spike has never seen — Tideways adds checks, and you can tick one the day it ships — still opens an incident, titled Tideways alert with no details. Spike would rather page you about a check it does not know than drop it; the whole payload is on the incident page.
Incident identity
Which notifications land on one incident is decided by the id Tideways repeats across them, never by the title.
Threshold breaches are identified by
notification.incident_id. Tideways sends the same number on theopened, on everyongoingand on theclosed, so one breach is one incident: it pages once, the re-notifications land on it, and theclosedresolves it. Older Tideways installs send that id only under the vendor's own misspellednotification.incidient_id; Spike reads both spellings, so an older install groups just as well.Exceptions and slow SQL queries are identified by
notification.error_group.id. Every later occurrence of the same group, and the notification that says somebody resolved it, carries that id, so a group that fires fifty times is one incident.missing-data,release,compare_release,weekly_reportand any unrecognisedtypecarry no id at all, and a threshold or error-group notification whose id is missing, blank or an unfilled template variable is treated the same way. Spike groups those on the title instead, which is why their titles deliberately hold nothing that moves between two deliveries — no reading, no timestamp, no week's numbers. Amissing-datanotification repeated an hour later reads identically and lands on the incident it already opened.
Identity is the alert, not the check. Two transactions breaching their own response-time thresholds are two notification.incident_ids, so they are two incidents.
Incident title
Tideways writes its own sentence about a PHP fault, so for an exception that sentence is the title, with nothing added:
A slow SQL query has no such sentence — Tideways sends notification.error_group.lastMessage as null — so the readable description it does send is used, with the repository method and the project after it, names written as Tideways sent them:
The same {description} in {method} on {project} title is used for an exception whose notification carries no usable error_group.id, because without an id Spike groups on the title and lastMessage changes with each occurrence.
A threshold breach carries no sentence at all, so the title is built from the check, how far past the threshold the reading went, and where:
Without a usable notification.incident_id (or incidient_id) Spike groups on the title, so it carries no reading: Response time threshold breached on storefront.
The percentage is Spike's own arithmetic on notification.value against notification.criticalThreshold, printed only when both read as numbers and the difference is at least 1%. The readings themselves are printed as Tideways sent them, so a title read beside Tideways' own screen shows the same numbers that screen does. The last line above is the one payload type that sends no criticalThreshold: Tideways' own notification.formatted_value and notification.formatted_threshold are echoed verbatim, spacing included, and nothing is computed. A breach whose readings did not arrive at all degrades to Response time threshold breached on storefront rather than guessing.
A threshold recovery reads as a recovery, in Tideways' own word:
An error group keeps its title when somebody moves it on in Tideways; the incident is resolved on notification.error_group.id.
And the notifications with no id are titled so that a repeat reads identically:
Titles are capped at 200 characters and carry no ids, hashes, link URLs or timestamps. Those are all on the incident page.
Use a Title Remapper if your team reads these by transaction and environment rather than by check:
A remapper does not affect threshold breaches and error groups that carry their id. The notifications Spike groups on the title (missing-data, releases, weekly reports, and any notification without a usable id) are matched on the title Spike builds, before any remapper runs, against the title stored on the open incident — and a remapper changes that stored title, so with a remapper on the integration their repeats open new incidents.
Severity
Spike does not read a severity from the Tideways payload, because Tideways does not send one — a notification is sent at all only because the check you configured said it was worth sending. Use an alert rule to set one.
If you want different levels on the badge, write an alert rule on type, on notification.status or on notification.value. Alert rules can also route an incident to another service or escalation policy, or suppress it entirely. Read more about priority and severity.
Prerequisites
A Tideways account with permission to manage the organisation's integrations and the project's settings
A Tideways integration in Spike and its webhook URL
Nothing to open on your own network. Tideways calls out to Spike
Step 1 — Create the integration in Spike
In Spike, go to Integrations → Add integration → Tideways, attach it to a service and an escalation policy, and copy the webhook URL. It looks like https://hooks.spike.sh/<your-token>/push-events.
Step 2 — Add Spike as a webhook integration in Tideways
A webhook lives on the Tideways organisation, and projects then point their notifications at it.
Sign in to Tideways at https://app.tideways.io and open Organizations from the top navigation. Pick the organisation your project belongs to.
Open the Integrations tab and select Add New Integration.
Choose Webhook as the integration type.
Fill in the integration. Both fields are required:
Name — something your team will recognise in the notification tickboxes later, for example
Spike. Tideways shows this name wherever the integration appears, so name it after Spike rather than after the projectURL — the webhook URL from Step 1. Tideways accepts
https://only, which is what Spike gives you. Paste it whole, with nothing appended
Save the integration.
Step 3 — Tick the notifications that feed it
The webhook receives nothing until a project asks it to. This is the step that decides which Tideways checks reach Spike, and it is done per project.
Open the project in Tideways and go to Project Settings → Notifications.
For each notification you want in Spike — Response Time, Error Rate, Transaction Response Time, Transaction Failure Rate, Exceptions, Slow SQL, Missing Data — tick the Spike webhook integration you created in Step 2.
For each of those, also tick "and when the alert is fixed". This one is required; see below.
Save.
Repeat for every project you want paging your rotation. A webhook integration is shared across the organisation, but the tickboxes are per project.
Step 4 — Confirm it end to end
Treat the first real alert as the test. Watch for all three moments:
A check crosses its threshold and an incident opens in Spike, titled with the check, the reading and your project, on the service you attached, escalating through your policy.
Tideways re-notifies while the breach lasts, and that lands on the same incident — a second event on it, not a second page.
The reading comes back under the threshold and the incident resolves itself, with
back to normalon the event list.
If the first step works and the third does not, step 3's "and when the alert is fixed" is the thing to check. If the first step works and the second opens a second incident, compare the two payloads on the incident pages: notification.incident_id should be the same number on both.
Payload reference
Tideways sends its own payload and there is no template to edit, so this section is a reference for what lands on the incident page and for what alert rules and the Title Remapper can read as data.body.<field>.
Every notification has the same envelope — type, link, organization, application, date and notification — and everything specific to the check is inside notification.
A response_time breach, which opens the incident:
It opens an incident titled:
The closed notification for the same breach, which resolves it. Note that notification.incident_id is the number the opened carried — that is what joins the two, and it is why the recovery is allowed to read differently:
It resolves the incident, and the event reads:
An exception, which carries notification.error_group instead of an incident id, and PHP's own sentence about the fault in lastMessage:
The same group once somebody moves it on in Tideways. error_group.status is the only field that changed, and it is what resolves the incident:
A transaction-failure-rate, the one payload type that sends Tideways' own formatted numbers and no criticalThreshold, plus the three fields that say where:
A missing-data, which carries no id. since_at_least_hours is the threshold you configured, so it is the same on every repeat and safe in a title Spike matches on; last_data_transmitted_at moves, so it is kept on the incident and deliberately never read into the title:
Spike keeps the whole body on the incident, so every field above — and anything Tideways adds to a notification later — is available to alert rules and the Title Remapper.
Things worth knowing
One webhook covers every check. There is no separate webhook per check or per project. Add the integration once on the organisation and tick it in as many projects as you like.
Several Spike integrations are fine. If different teams own different projects, create one Spike integration per team and one Tideways webhook integration per Spike integration, then tick the right one in each project.
Resolving in Spike does not touch Tideways. The alert stays open in Tideways until the reading recovers, and an error group stays open until somebody moves it on there.
ignoredandnot_errorresolve the incident too. Tideways is finished with the group either way, so Spike is as well — and the title says which of the three it was, so the responder can see that nobody actually fixed anything.The readings are printed, not interpreted. Tideways' webhook page does not state the unit of
valueandcriticalThresholdon the response-time checks, so Spike prints the numbers bare rather than appendingmsto something that might not be milliseconds.Tideways' other notification channels are separate. The email and Slack notifications you have already ticked keep working; the webhook is additional, not a replacement.
Troubleshooting
Disclaimer: These integration instructions are offered independently by Spike.sh, and Spike.sh is not affiliated with nor a partner of Tideways GmbH.
Last updated

