Sometimes you have actions in your Rails app that you know take a long time. Getting alerts on these actions is just noise.
With the updated Rails Monitoring Plugin, you can filter out any requests on which you don't want to be notified. You supply a regular expression, so you make as simple or complicated as you need to.
Update your Rails plugin
If you already have the Rails plugin installed, you need to update it. Go to plugin->code and click Update:
Then go to plugin->edit and click Update Options:
The new goodness is under "advanced options":
You provide a regular expression for actions you want don't want to be alerted on when they're slow. In the simplest case, don't even worry about it being a regular expression -- just provide a string you want to match. For example, if you don't want to be alerted to any slow actions with
admin in the URI, just put
admin in the Ignored Actions field.
More Complicated Matches
To ignore all actions under
admin and also
accounts/new, the regex is
(admin|accounts\/new). If you wanted to make sure
admin only matches paths starting with admin, just match the beginning slash:
If you're building a complicated regex, try it out separately to ensure it matches/doesn't match what you expect. I dig on Rubular for quick regex sanity checks. Of course, the plugin will tell you if your regex has a problem, but you'll get faster feedback by running it through Rubular.
Note that the match is case insensitive -- no need to worry about case.
Finally, note that excluded actions will still be analyzed in the daily Rails Analysis reports, so you'll still get metrics on them -- you just won't get email notifications for actions you already know are slow!