BugSnag rate limit notifications on your phone.

Get a push notification when a BugSnag project nears its event rate limit, or starts dropping events because it hit it.

projectSamplingStartedDeveloper toolsMonitoring
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 BugSnag

Add it as a webhook for Rate limit.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the BugSnag rate limit 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 BugSnag, open your project's Settings > Integrations and data forwarding and choose Webhook.
  3. Paste your webhook URL as the webhook URL.https://••••••••/•••••••• your personal URL, shown after install
  4. Under notifications, pick the Rate limit triggers you want and save. Use Test to send a sample.
  5. On the webhook integration, turn on the **approaching rate limit** and **rate limited** notifications (`projectApproachingRateLimit` and `projectSamplingStarted`). Every other trigger is ignored by this recipe.
  6. BugSnag doesn't sign webhook requests, 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// BugSnag → rate limiting
2// Fires when a BugSnag project is close to its event rate limit, or has started
3// sampling (dropping) events because it hit it.
4// Docs: https://docs.bugsnag.com/product/integrations/data-forwarding/webhook/
5
6const TRIGGERS = {
7 projectApproachingRateLimit: {
8 title: "⚠️ Approaching BugSnag rate limit",
9 text: "is close to its event rate limit",
10 priority: 0,
11 },
12 projectSamplingStarted: {
13 title: "🚫 BugSnag is sampling events",
14 text: "hit its rate limit, so BugSnag is now dropping some events",
15 priority: 1,
16 },
17}
18
19// Only link to real http(s) URLs.
20function link(url, cta) {
21 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
22}
23
24function handleRequest(request) {
25 const body = request.body || {}
26 const type = body.trigger?.type
27
28 // Guard: only rate-limit triggers, so error notifications on this integration stay quiet.
29 if (!Object.prototype.hasOwnProperty.call(TRIGGERS, type)) {
30 console.log(`Ignoring BugSnag trigger "${type ?? "unknown"}"`)
31 return null
32 }
33
34 const trigger = TRIGGERS[type]
35
36 return {
37 title: trigger.title,
38 message: `${body.project?.name ?? "Your project"} ${trigger.text}`,
39 topic: "BugSnag",
40 priority: trigger.priority, // High once you're actually losing error reports
41 buttons: link(body.project?.url, "View project"),
42 }
43}
Payload

The BugSnag projectSamplingStarted webhook

This is what BugSnag sends to your URL for rate limit. It is a sample, trimmed to the fields recipes use.

projectSamplingStarted · sample.json
1{
2 "account": {
3 "id": "56b9ca7f17025f8756f69054",
4 "url": "https://app.bugsnag.com/accounts/acme",
5 "name": "Acme"
6 },
7 "project": {
8 "id": "56b9ca7f17025f8756f69055",
9 "url": "https://app.bugsnag.com/acme/web-app",
10 "name": "Web App"
11 },
12 "trigger": {
13 "type": "projectSamplingStarted",
14 "message": "Project is being rate limited"
15 }
16}
FAQ

BugSnag rate limit 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 BugSnag 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

BugSnag on your phone in two minutes.

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