Easy way to get list of users that hit a particular error?

Sometimes after resolving an error in Sentry, I’d like to get the list of user ids or emails for all users affected by that error so that I can send them an email telling them it’s fixed. I think I could get this data by iterating over an event with the Sentry API, but is there an easier way?

In an issue you can go to Tags > User and click on more details. There is an option to export a CSV with the user information.

1 Like

that works, thanks!

some more characters

But, for me it only lists the first 1000 users who are effected. I’ve got 2.1k users effected by a particular issue, any way to export the whole list of user ids?

Is it possible to do something similar on top of a query instead?

Doing it from the issues doesn’t allow me to apply filters. Or is there a way?

I’m also trying to export the list of users affected by an error, and running into the 1,000 limit. There are 1.5K users in the list I’m trying to export.

I dug through the code and found why. In GroupTagExportView, there is a call to get_raw_data() (source). This method takes two optional parameters limit and offset, which are set to 1000 and 0 by default (source).

Could the endpoint be changed to allow specifying an offset in query parameters?

Here’s the change I have in mind:

        offset = 0
        if "offset" in self.request.GET:
            offset_string = self.request.GET["offset"]
                offset = int(offset_string)
            except ValueError:

        filename = u"{}-{}".format(processor.group.qualified_short_id or processor.group.id, key)

        return self.to_csv_response(processor.get_raw_data(offset=offset), filename, key=key)