struct

Bugsnag::User

Inherits JSON::Serializable < Struct < Value < Object

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.

Constructors

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: "foo@example.com", name: "Foo Bar")
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

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)
Source

Instance methods

email
Source
name
Source