struct Bugsnag::User
- Bugsnag::User
- Struct
- Value
- Object
Overview
The user information to report to Bugsnag. Bugsnag lets you report which user experienced this issue so you can see how many users were impacted by it in the aggregate view and see what other issues that particular user is experiencing.
Included Modules
- JSON::Serializable
Defined in:
bugsnag.crConstructors
-
.new(id : Nil | String, name : Nil | String, email : Nil | String)
Instantiate a
Bugsnag::Userwith the given string#id,#name, and#emailproperties. - .new(pull : JSON::PullParser)
Class Method Summary
-
.from_user(user)
If your own user model has getters for
#id,#name, and#email, you can pass it toBugsnag::User.from_userto convert your user to aBugsnag::Usertrivially.
Instance Method Summary
Constructor Detail
def self.new(id : Nil | String, name : Nil | String, email : Nil | String)
#
Instantiate a Bugsnag::User with the given string #id, #name, and
#email properties.
Bugsnag::User.new(id: "1234", email: "[email protected]", name: "Foo Bar")
Class Method Detail
def self.from_user(user)
#
If your own user model has getters for #id, #name, and #email, you can
pass it to Bugsnag::User.from_user to convert your user to a
Bugsnag::User trivially.
struct MyAppUser
getter id : UUID
getter email : String
getter name : String?
# other details like how to instantiate it or fetch from the DB
end
Bugsnag::User.from_user(my_app_user)