Setting Up Applications in Raygun For Optimal Error Monitoring

| 4 min. (673 words)

Error monitoring doesn’t have to be difficult and setting up Raygun is super simple, all it takes is to add a few short lines of code to your application and a few minutes of your time. But once you are reporting errors successfully, you might be wondering how best to set things up with all the other moving parts of your applications. Or as a first time user, you might be wondering what is an ‘application’ in Raygun exactly? Well, here we’ll detail a bit more about best practices when setting up applications in Raygun and how they correspond to your own applications.

What defines an ‘application’ in Raygun?

Well, each application you create in Raygun has a unique and separate API key, and it is the API key that tells Raygun where to send the error report when we receive it. Essentially your API key provides a way to group errors into containers, an easy way to organise and sort them. Your very own filing system for your errors to be stored under.

Add applications in Raygun for each language and platform

You have one product or ‘application’ as you might call it, so you only need one application in Raygun right? Well, this is not recommended.

If you wanted to have one Raygun application monitoring errors across your entire stack then you certainly could, but using one Raygun application and one API key means that all errors from your product are then contained under a single Raygun application. By doing this, when viewing your Raygun dashboard you’ll see errors from all sorts of languages, platforms, environments and URLs – Not very useful, right? When looking for the highest priority issues or problems you care about the most it’s going to be far better to have things broken down into logical order and separated from each other.

But what is the best way to set this up?

Rather than have a single application and API key set up to handle all errors that are sent to Raygun, it’s best to set up multiple applications and have multiple API keys for each part of your application. For example, if your backend is built in Node.js, you want to monitor Javascript errors on your front end website and you also have an iOS and Android app to monitor, having multiple applications gives you the benefits of having errors sorted by programming language and platform as well as optimal grouping logic and custom setup options for each language.

What about environments?

Want to see errors specifically from dev, test and production environments? No problem! You can do this by creating additional applications and therefore having a separate API keys for each environment. Adding things like custom properties to error messages on the fly provides a clunky and notoriously bad user experience. Multiple applications set up to handle environments offers a far better user experience and makes sure everything is kept neat and tidy whilst per application notification rules allow you to be notified by environments you need to be (like production when things are affecting your users!). Separate applications can also be viewed on your custom dashboard/s.

Built for teams

If your team is tasked with looking after specific parts of a large website, adding more applications allows you to use separate API keys for each section of your site, reporting errors into separate Raygun applications that your micro-teams can be made aware of.

What if I still only want to set up one Raygun application for all my environments?

You could use tags for this and filter the dashboard (the filters then apply to the groups too, so you could just drill into the groups and see the instances tagged with the environment variable).

Still got questions about the best way to set up you applications?

Feel free to hit the “Contact Raygun” link on the Raygun dashboard to get in touch with us!

Don’t have a Raygun account yet? It takes a few moments to get started with a free 14 day trial.