Add Bugsnag JS logging

This commit is contained in:
Maikel Linke
2020-03-31 15:48:52 +11:00
committed by Luis Ramos
parent d254df7ccc
commit f6bb8a9a04
3 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
%script{src: "//d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js"}
:javascript
window.bugsnagClient = bugsnag('#{ENV["BUGSNAG_JS_KEY"]}');

View File

@@ -37,6 +37,7 @@
#footer
%loading
= render "layouts/bugsnag" if ENV["BUGSNAG_JS_KEY"].present?
%script{:src => "https://js.stripe.com/v3/", :type => "text/javascript"}
%script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry#{ ENV['GOOGLE_MAPS_API_KEY'] ? '&key=' + ENV['GOOGLE_MAPS_API_KEY'] : ''} "}
= javascript_include_tag "darkswarm/all"

View File

@@ -37,6 +37,9 @@ SMTP_PASSWORD: 'f00d'
# MAILS_FROM: hello@example.com
# MAIL_BCC: manager@example.com
# Javascript error reporting via Bugsnag.
#BUGSNAG_JS_KEY: ""
# SingleSignOn login for Discourse
#
# DISCOURSE_SSO_SECRET should be a random string. It must be the same as provided to your Discourse instance.