Sentry metric alert notifications on your phone.

Get a push notification when a Sentry metric alert (error rate, latency, crash-free sessions, …) goes critical, warning, or resolves.

How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into Sentry

Add it as a webhook for Metric alert.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Sentry metric alert webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In Sentry, go to Settings > Developer Settings > Custom Integrations and create an Internal Integration.
  3. Paste your webhook URL as the Webhook URL and follow the setup notes below for Metric alert.https://••••••••/•••••••• your personal URL, shown after install
  4. Save the integration.
  5. In your internal integration (**Settings → Developer Settings → Custom Integrations**), turn on **Alert Rule Action** and save.
  6. Then open a metric alert rule and, for its **Critical** and **Warning** thresholds, add the action **Send a notification via _your integration_**. Sentry also sends the resolved notification to the same action.
  7. Sentry signs each request with a `Sentry-Hook-Signature` header, but JustPush doesn't check it yet, so keep your endpoint URL private.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// Sentry → metric alert
2// Fires when a Sentry metric alert (error rate, latency, crash-free rate, …) goes
3// critical, warning, or back to resolved.
4// Docs: https://docs.sentry.io/organization/integrations/integration-platform/webhooks/metric-alerts/
5
6// Each state, how to label it, and how loud to be.
7const STATES = {
8 critical: { emoji: "🔴", priority: 1 },
9 warning: { emoji: "🟠", priority: 0 },
10 resolved: { emoji: "✅", priority: -1 },
11}
12
13// Only link to real http(s) URLs.
14function link(url, cta) {
15 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
16}
17
18function handleRequest(request) {
19 const body = request.body || {}
20 const alert = body.data?.metric_alert
21
22 // Guard: only metric alerts, so other Sentry webhooks on this integration stay quiet.
23 if (!alert || !Object.prototype.hasOwnProperty.call(STATES, body.action)) {
24 console.log(`Ignoring Sentry "${body.action ?? "unknown"}" webhook — not a metric alert`)
25 return null
26 }
27
28 const state = STATES[body.action]
29 const name = alert.alert_rule?.name ?? alert.title ?? "Metric alert"
30 // description_text looks like "1000 events in the last 10 minutes\nFilter: level:error".
31 const detail = String(body.data.description_text ?? "")
32 .split(/\\n|\n/)
33 .map((line) => line.trim())
34 .filter(Boolean)
35 .join(" · ")
36
37 return {
38 title: `${state.emoji} ${body.action === "resolved" ? "Resolved: " : ""}${name}`,
39 message: detail || (body.action === "resolved" ? "Back to normal" : `Alert is ${body.action}`),
40 topic: "Sentry",
41 priority: state.priority,
42 buttons: link(body.data.web_url, "View alert"),
43 }
44}
Payload

The Sentry metric_alert webhook

This is what Sentry sends to your URL for metric alert. It is a sample, trimmed to the fields recipes use.

metric_alert · sample.json
1{
2 "data": {
3 "web_url": "https://acme.sentry.io/alerts/rules/details/7/",
4 "metric_alert": {
5 "id": "4",
6 "title": "Sacred Marmot",
7 "status": 20,
8 "projects": [
9 "web"
10 ],
11 "alert_rule": {
12 "id": "7",
13 "name": "Too many errors",
14 "query": "level:error",
15 "dataset": "events",
16 "projects": [
17 "web"
18 ],
19 "aggregate": "count()",
20 "time_window": 10
21 },
22 "identifier": "1",
23 "date_started": "2026-09-29T08:06:40.000000Z"
24 },
25 "description_text": "1000 events in the last 10 minutes\nFilter: level:error",
26 "description_title": "Critical: Too many errors"
27 },
28 "actor": {
29 "id": "sentry",
30 "name": "Sentry",
31 "type": "application"
32 },
33 "action": "critical",
34 "installation": {
35 "uuid": "a8e5d37a-696c-4c54-adb5-b3f28d64c7de"
36 }
37}
FAQ

Sentry metric alert notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into Sentry and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

Sentry on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.