module Bugsnag

Overview

Bugsnag

Defined in:

bugsnag.cr

Constant Summary

VERSION = "0.1.0"

Class Method Summary

Class Method Detail

def self.api_key : String #

[View source]
def self.api_key=(api_key : String) #

[View source]
def self.notify(exception : ::Exception, request : HTTP::Request | Nil = nil, severity : Event::Severity = Event::Severity::Warning, context : String | Nil = nil, user : User | Nil = nil, session : Session | Nil = nil, unhandled : Bool = true, metadata : Metadata | Nil = nil, app : App | Nil = nil) #

Notify Bugsnag of an exception

begin
  handle(thing)
rescue ex
  Bugsnag.notify ex,
    severity: Bugsnag::Event::Severity::Error,
    app: Bugsnag::App.new(
      id: "my-app",
      release_stage: ENV["DEPLOYMENT_ENVIRONMENT"]? || "development",
    ),
    metadata: Bugsnag::Metadata{"thing" => thing.to_h}
end

[View source]