// 2.4.8 http://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.4.8.min.js


// manual code: make sure Bugsnag has it's API KEY
if (window.Bugsnag) {
    try {
        window.Bugsnag.releaseStage = gon.global.env
        window.Bugsnag.enabledReleaseStages = gon.global.bugsnag_notify_release_stages

        window.Bugsnag.start(
            {
                apiKey: gon.global.bugsnag_key,
                appVersion: gon.global.version,
                appType: 'client',
                releaseStage: gon.global.env,
                enabledReleaseStages: gon.global.bugsnag_notify_release_stages,
                onError: function (event) {
                    //
                }
            }
        )


        if (gon.user_id) {
            Bugsnag.setUser(gon.user_id, gon.user_email, gon.user_name)
        }
    }
    catch (e) {
        console.log("Unable to init bugsnag", e);
    }

}