bugsnag / bugsnag-ruby

BugSnag error monitoring & reporting software for rails, sinatra, rack and ruby
https://docs.bugsnag.com/platforms/ruby
MIT License
246 stars 174 forks source link

Include warden scope in user info #821

Closed javierjulio closed 2 months ago

javierjulio commented 3 months ago

Goal

Closes #777

The default user metadata includes id but without the Warden scope, if you have multiple user types, for example: User and AdminUser, it wouldn't be possible to know who's who when removing the default fields which are PII.

Design

Simple approach as Warden scope is already used to determine the user object in this case, so the objective is to just include the scope value as another user field.

Changeset

Just adds a warden_scope key to the user object.

Testing