Raygun Feature Request

Feature Request

Filter errors by custom data

Current Status:

Will not add

Votes:

3


Avatar

AdamBB

You guys have the excellent global custom data proc available in the Ruby/Rails initializer, but I want to be able to filter my errors based on information in the custom hash.

{
  database-shard: "client-1",
  some_other: "entry"
}

And then only show errors where "database-shard" == 'client-1'


Avatar

Raygun

John-Daniel Trask

Posted on
Oct 03 2017

Hi,

We won't be doing this because custom data is designed to be anything (can be a blob, can be json, can be binary data). The recommended approach for this is to use the Tags, which can be filtered on and consist of a simple set of keys.

I'd recommend that you encode the key & value together so you can more easily use the tags to filter your dashboards.

I hope that helps,

John-Daniel Trask

Avatar

AdamBB

Posted on
Oct 03 2017

Hey John-Daniel,

The problem I'm having with tags in a Rails app is that they are defined during app initialisation, rather than at run time. I would like to set a tag dynamically when the error actually occurs. Is that possible? I have been unable to figure out a way to do it yet.

Adam

Avatar

ubermouse

Posted on
Oct 03 2017

Hi Adam,

You are correct that you can't add tags dynamically to automatically tracked exceptions, but I'm going to do some work on Raygun4Ruby this week so I'll add support for that when I do. However, if you are using Raygun.track_exception you can pass tags in using the second parameter to that currently, but that will only work for manually tracked exceptions which isn't ideal.

Thanks, Taylor

Avatar

ubermouse

Posted on
Oct 04 2017

Hi Adam,

I've just released Raygun4Ruby v2.5.0 with support for dynamically setting the exception tags like custom_data which should let you fulfill this use case.

Regards, Taylor