struct Bugsnag::User

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

Defined in:

bugsnag.cr

Constructors

Class Method Summary

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

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

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)

[View source]

Instance Method Detail

def email : String | Nil #

[View source]
def id : String | Nil #

[View source]
def name : String | Nil #

[View source]