Label your exceptions and stay organized with Raygun’s tagging feature

Jesse James.NET, Android, General, iOS, Java, Javascript, Languages, Node.js, Other, PHP, Resource, Tech Stuff, Web Development5 Comments

tags

Tags have been a part of Raygun Crash Reporting for a some time now and are an important part of helping developers track and filter their exceptions.  Tags may seem simple at first glance but the power they give developers to stay organized and save time in tracking down the source of an exception makes them an integral part of maintaining applications.

It only takes a few minutes to get tags set up in your code but they can save you hours of developer time down the road when your application grows larger and the exception causes become more complex.

So what are tags?

Tags are labels that can be given to exceptions inside your code.  These labels are then passed onto Raygun when exceptions are tracked. Having tags on your exceptions gives you several powerful abilities when it comes to better organizing your inbound exceptions. Raygun allows you to filter your exceptions in three ways:

  1. Inbound filters: You can filter out inbound exceptions by tag.
  2. Searching: You can search for specific tags to see associated exceptions.
  3. Filtering: You can filter for or against specific tags.

These three abilities are great in themselves, but where they really shine is when used in unique ways. For example:

Do you have a custom checkout path through your application for certain VIP users?  

You can use the tag feature to quickly differentiate the exceptions thrown along these custom paths from normal user paths even if the stack traces are nearly identical.

Do you have pages that contain several different resources or scripts being loaded from different sources?  

You can use tags to logically separate out those pages into distinct sections to narrow down the source of an exception when one is thrown.  So when an exception gets thrown due to a small section of a loaded page you can quickly drill down on know which section without having to sift through error details.

Here at Raygun, we use tags when building Visual Studio extensions to capture a snapshot of the currently running/installed extensions when an exception is thrown.  At a deeper level, when an exception occurs we do a quick query of currently active extensions and add them as tags to the exception before sending it to Raygun.  This allows us to track which extensions might be causing a conflict and to quickly search/filter through those exceptions.  Additionally it enables us to see if there are any patterns between the exceptions and extensions that were active at the time.

Do you use different environments for testing, dev and/or production?

You can use tags to differentiate between environments. This is especially important for incident triage – if you see a critical error instance with a ‘production’ tag, you can then prioritize your workload to fix the production bug. If, on the other hand, the error instance was tagged as being in a test environment, you would may choose to give that error instance less priority on your backlog.

Now that we know why tags are important, let’s take a look at how to effectively tag exceptions in detail:

1. Inbound Filters

Tags can be used with Inbound Filters to prevent certain exceptions from being tracked by Raygun.

Here’s how to set it up:

Step 1:

Click on Filtering in the left sidebar navigation menu under Crash Reporting:

Filtering option under Crash Reporting navigation menu

Step 2:

Click on ‘Tag’ in the ‘Create a filter’ menu, and enter in the tag. Click ‘Add Filter’ to apply:

Using Tags with Inbound Filters

2. Searching

Being able to quickly search for a specific tag saves a developer from having to look through an error group in order to find a specific occurrence or application state.  This, in turn, gets a developer closer to resolving the exceptions that come in from their application in a much shorter amount of time.

Here’s how to get started searching exceptions for a specific tag:

Step 1:

Enter the tag into the search bar located in the left sidebar and hit your ‘Enter/Return’ key:

Searching Raygun Tags

 

3. Filtering

Much like searching, being able to filter tags (either to include them or exclude them) can be a massive time saver when your application grows larger and more complex .

To setup a quick filter for tags:

Step 1:

Click on ‘Add filter’ on the Raygun Crash Reporting dashboard:

Raygun Add Filter button on dashboard

Step 2:  

In the ‘Add Filter’ window, select ‘Tag’ from the ‘Tag’ dropdown menu. Then choose an ‘Operator’ (equal or not equal) from the next dropdown, and then finally enter in the tag under the ‘Label’ text field.  Then click ‘Apply filter’:

Filtering Raygun Tags

We offer the tag feature on the following supported languages:

We are continuously working adding tag support to other languages but if you have a specific language request please let us know!

Next level software intelligence across your entire stack. Get deeper analysis into how your applications are really performing. Learn more.

5 Comments on “Label your exceptions and stay organized with Raygun’s tagging feature”

  1. Pingback: Feature update: Filter inbound crash reports by error name and tag

  2. Pingback: Feature update: Filter inbound errors with no specific version and PHP Myadmin provider

  3. Pingback: Feature release: Clickable error tags for automatic error filtering - The Raygun Blog

  4. David Clayton

    Feature request, It would be cool if we could use tags to route errors from one raygun app to another raygun app. I have the need to route a subset of errors to another Raygun app so that my customer can allocate a dedicated team to manage these errors and assign users. It will also ensure they only see the issues they need to worry about.

    1. Freyja Spaven

      Hi David,

      Thanks for your comment, I’ve sent you a quick email around connecting about some options.

      Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *