
If you have some experience setting up monitoring for different setups, this post is for you. Since different parts of your architecture have different tasks, they also have different expectations. Today, we’ll take a quick dive into how to deal with that reality and set up monitoring for it.
Warning: In this post, you'll have to bear with our enthusiasm for setting things up perfectly.
Not All Parts Are Created Equal
In a setup with limited complexity, let's say with background jobs and a customer-facing app or web interface, we already observe different expectations. A background job can run for minutes before things are considered slow, but a customer will already have CTRL-W’d you away by then.
Similarly, for throughput, you might have totally different expectations for different URL’s that you get requests on. For instance, there might be API endpoints where you expect a much higher throughput than a normal web request.
Monitoring for the Differences
The key to being woken up when needed, and being able to sleep when you can, is having the wisdom to see the difference. For a good night’s sleep, we recommend setting up good monitoring. We have an idea of what that should be, but that isn't what this article is about. Just set up any monitoring.
Because we know AppSignal best, here are two ways you would use it to monitor for these differences.
Namespaces
The first way to separate throughput triggers is to set different namespaces, with high-throughput actions in a separate namespace (e.g. an api namespace, or integrations namespace). Read on how to set custom namespaces in our documentation.
Custom Metrics
The second option is to separate triggers using the “custom metrics” form on the page where you set a new Trigger. You can then use wildcards in the tags to match groups of actions. To do this for throughput triggers, the fields should be transaction_duration for the name, count for the field and the following headerType: legacy
tags: namespace:web, action:Webhooks*
.

When to Use Which Method
Either method is valid. We use separate namespaces ourselves. Having these actions in a separate namespace means that it is easier to treat not just the triggers, but the errors differently as well, and have them nicely structured in the AppSignal interface. That way, we can get a good separate overall view on things. API endpoints will not just have more throughput, but they also tend to generate more errors (invalid user data, etc).
That way, it is easier to, for example, treat errors on an API endpoint more like a fact of life. For API endpoints, we ourselves are more interested in the relative error rates (e.g. spikes) as opposed to other actions in the web namespace, where we’d like to have zero errors at all times.
Setting things up via Customer Metrics makes more sense if there are only a few actions where you only want to set different throughput triggers, but keep those in the same overview for errors with the rest of the application.
👋 If you liked this, take a look at other Ruby (on Rails) performance articles in our Ruby performance monitoring checklist.
Back to Curbing Our Enthusiasm
Thanks for bearing through our enthusiasm. As you can tell, it is these kinds of tweaks that still get us really excited when dogfooding our own solution.
If some enthusiasm stuck on you, you might want to try out AppSignal.
Wondering what you can do next?
Finished this article? Here are a few more things you can do:
- Try out AppSignal with a 30-day free trial.
- Reach out to our support team with any feedback or questions.
- Share this article on social media
Most popular AppSignal articles
Easily Monitor Multiple Heroku Apps with AppSignal
You can now monitor multiple Heroku apps from a single AppSignal instance.
See moreFine-Tune Your Charts with Minutely Metrics in AppSignal
Discover how minutely metrics in AppSignal deliver precise performance monitoring. Check out detailed performance data, spot anomalies quickly, troubleshoot issues more efficiently, and optimize your application's performance.
See moreSecure Your Sign-Ins with AppSignal's Single Sign-On
Secure team sign-ins and enhance access management with AppSignal's Single Sign-On Business Add-On. Integrate AppSignal with your identity provider for seamless, secure access management.
See more

Stefan Verkerk
Stefan often shares stories about his Mosaic script-kiddie years. Has been scaling startups since the 90s. Today, he does management and growth things at AppSignal. Has amazing Excel to SQL chops on his customized MacBook.
All articles by Stefan VerkerkBecome our next author!
AppSignal monitors your apps
AppSignal provides insights for Ruby, Rails, Elixir, Phoenix, Node.js, Express and many other frameworks and libraries. We are located in beautiful Amsterdam. We love stroopwafels. If you do too, let us know. We might send you some!
