Catch deployments that made your app slower or less reliable
Every hour we compare the 30 minutes before and after each release, and only speak up when a deployment genuinely degraded speed or reliability.
Every hour, tell me whether anything we just shipped made the product worse. Find the deployments New Relic recorded recently, measure what happened to each application right after the release, and speak up only when a release clearly degraded things.
Start with List Applications in New Relic to get every APM application reporting to the account. For each application, call List Deployments and keep the deployment markers recorded in the last 2 hours. Each marker gives you the revision, the description or changelog, the user who recorded it, and its timestamp.
Only evaluate a marker once it is at least 30 minutes old and less than 90 minutes old. Anything younger than 30 minutes does not yet have a complete after-window, and anything older was already assessed on an earlier run. This band means every deployment gets judged exactly once, with a full 30 minutes of data on both sides, and never gets reported twice.
For each qualifying marker, use Run NerdGraph GraphQL Query to compare the 30 minutes after the deployment against the 30 minutes before it. One NRQL query per window returns all three numbers you need at once:
SELECT count(*), percentage(count(*), WHERE error IS true), percentile(duration, 95) FROM Transaction WHERE appName = '<application name>' SINCE '<window start>' UNTIL '<window end>'
Wrap it in NerdGraph as actor { account(id: <account id>) { nrql(query: "...") { results } } } and run it twice per deployment: once for the 30 minutes ending at the marker timestamp, once for the 30 minutes starting at it. Remember that NerdGraph reports query errors as a top-level errors array inside an HTTP 200 response, so check for that rather than trusting the status code.
Do not raise anything unless the change is both real and measurable. Check throughput first: skip the deployment entirely unless both windows saw at least 100 transactions, because a quiet service with three requests must never start a rollback conversation. Then treat it as a regression only when a metric clears both an absolute and a relative bar. For error rate, that is up by at least 1 percentage point and at least 50 percent relative. For 95th percentile response time, that is up by at least 200ms and at least 25 percent relative. Either metric clearing its pair of bars is enough to report.
When a deployment clears those bars, post to the engineering channel with Send a Message in Slack. Name the application, the revision, and who deployed it, then show the before and after numbers side by side so the reader can judge the size of the change without opening New Relic. Include the throughput in both windows so nobody has to wonder whether the sample was big enough to trust.
Then use Create Issue in Linear for the same regression so it is owned rather than merely announced. Title it with the application and revision, put the before and after numbers plus the deployment timestamp and the deployer in the description, and reference the Slack message. Set priority by severity, treating an error rate regression as more urgent than a latency one.
Stay completely silent when nothing regressed. No Slack message, no Linear issue, no all-clear summary. Most hours will produce no output at all, and that is the correct behaviour: the value of this workflow is that a notification from it always means something genuinely got worse.
Example output
What does this prompt do?
- Checks every hour for applications that were deployed recently, so no release goes unmeasured.
- Compares the half hour before each deployment against the half hour after it, looking at both error rate and response time.
- Only raises an alert when the change is large enough and the service is busy enough to be worth acting on, so a quiet service with a handful of requests never triggers a false alarm.
- Posts the before and after numbers side by side in Slack and opens a Linear issue so the regression has a clear owner.
What do I need to use this?
- A New Relic account with the applications you want to watch reporting into it
- Deployment markers recorded in New Relic when you release, which is what tells the workflow a new version went out
- A Slack workspace and a channel for the alerts to land in
- A Linear workspace and a team to file regressions under
How can I customize it?
- Change how sensitive it is by raising or lowering the error rate and response time thresholds that count as a real regression.
- Change the minimum traffic required before a comparison counts, so busier or quieter services are judged fairly.
- Change which Slack channel gets the alert, which Linear team owns the issue, and how wide the before and after windows are.
FAQs
Will this ping me every time we deploy?
What stops it alerting on a service that barely gets any traffic?
Does it roll anything back automatically?
What happens if we deploy several times in one hour?
Do we need to change how we deploy for this to work?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
On the first Monday of every month, find the alarms nobody watches and the monitoring you quietly pay for, then get a costed cleanup list in Slack and Linear.
Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.
Every Tuesday we pull your best new reviews, draft social captions, email testimonials and product page quotes, then stage them in Notion for approval.
Stop hearing about bad releases from your customers first.
Put an hourly check on every deployment so slow and broken releases surface within the hour, with the numbers to back it up.