This repository has been archived by the owner on May 10, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
GOOGLE_MAP_API_KEY="hogehoge" | ||
ROLLBAR_ACCESS_TOKEN="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- if Rails.env.production? | ||
javascript: | ||
var _rollbarConfig = { | ||
accessToken: "0a35372d2c794f0e9c5cf916dca4c642", | ||
captureUncaught: true, | ||
payload: { | ||
environment: "production" | ||
} | ||
}; | ||
!function(a,b){function c(b){this.shimId=++h,this.notifier=null,this.parentShim=b,this.logger=function(){},a.console&&void 0===a.console.shimId&&(this.logger=a.console.log)}function d(b,c,d){a._rollbarWrappedError&&(d[4]||(d[4]=a._rollbarWrappedError),d[5]||(d[5]=a._rollbarWrappedError._rollbarContext),a._rollbarWrappedError=null),b.uncaughtError.apply(b,d),c&&c.apply(a,d)}function e(b){var d=c;return g(function(){if(this.notifier)return this.notifier[b].apply(this.notifier,arguments);var c=this,e="scope"===b;e&&(c=new d(this));var f=Array.prototype.slice.call(arguments,0),g={shim:c,method:b,args:f,ts:new Date};return a._rollbarShimQueue.push(g),e?c:void 0})}function f(a,b){if(b.hasOwnProperty&&b.hasOwnProperty("addEventListener")){var c=b.addEventListener;b.addEventListener=function(b,d,e){c.call(this,b,a.wrap(d),e)};var d=b.removeEventListener;b.removeEventListener=function(a,b,c){d.call(this,a,b&&b._wrapped?b._wrapped:b,c)}}}function g(a,b){return b=b||this.logger,function(){try{return a.apply(this,arguments)}catch(c){b("Rollbar internal error:",c)}}}var h=0;c.init=function(a,b){var e=b.globalAlias||"Rollbar";if("object"==typeof a[e])return a[e];a._rollbarShimQueue=[],a._rollbarWrappedError=null,b=b||{};var h=new c;return g(function(){if(h.configure(b),b.captureUncaught){var c=a.onerror;a.onerror=function(){var a=Array.prototype.slice.call(arguments,0);d(h,c,a)};var g,i,j="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(g=0;g<j.length;++g)i=j[g],a[i]&&a[i].prototype&&f(h,a[i].prototype)}return a[e]=h,h},h.logger)()},c.prototype.loadFull=function(a,b,c,d,e){var f=g(function(){var a=b.createElement("script"),e=b.getElementsByTagName("script")[0];a.src=d.rollbarJsUrl,a.async=!c,a.onload=h,e.parentNode.insertBefore(a,e)},this.logger),h=g(function(){var b;if(void 0===a._rollbarPayloadQueue){var c,d,f,g;for(b=new Error("rollbar.js did not load");c=a._rollbarShimQueue.shift();)for(f=c.args,g=0;g<f.length;++g)if(d=f[g],"function"==typeof d){d(b);break}}"function"==typeof e&&e(b)},this.logger);g(function(){c?f():a.addEventListener?a.addEventListener("load",f,!1):a.attachEvent("onload",f)},this.logger)()},c.prototype.wrap=function(b,c){try{var d;if(d="function"==typeof c?c:function(){return c||{}},"function"!=typeof b)return b;if(b._isWrap)return b;if(!b._wrapped){b._wrapped=function(){try{return b.apply(this,arguments)}catch(c){throw c._rollbarContext=d()||{},c._rollbarContext._wrappedSource=b.toString(),a._rollbarWrappedError=c,c}},b._wrapped._isWrap=!0;for(var e in b)b.hasOwnProperty(e)&&(b._wrapped[e]=b[e])}return b._wrapped}catch(f){return b}};for(var i="log,debug,info,warn,warning,error,critical,global,configure,scope,uncaughtError".split(","),j=0;j<i.length;++j)c.prototype[i[j]]=e(i[j]);var k="//d37gvrvc0wt4s1.cloudfront.net/js/v1.2/rollbar.min.js";_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||k;var l=c.init(a,_rollbarConfig);l.loadFull(a,b,!1,_rollbarConfig)}(window,document); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
require 'rollbar/rails' | ||
Rollbar.configure do |config| | ||
# Without configuration, Rollbar is enabled in all environments. | ||
# To disable in specific environments, set config.enabled=false. | ||
|
||
config.access_token = ENV['ROLLBAR_ACCESS_TOKEN'] | ||
|
||
unless Rails.env.production? | ||
config.enabled = false | ||
end | ||
|
||
# By default, Rollbar will try to call the `current_user` controller method | ||
# to fetch the logged-in user object, and then call that object's `id`, | ||
# `username`, and `email` methods to fetch those properties. To customize: | ||
# config.person_method = "my_current_user" | ||
# config.person_id_method = "my_id" | ||
# config.person_username_method = "my_username" | ||
# config.person_email_method = "my_email" | ||
|
||
# If you want to attach custom data to all exception and message reports, | ||
# provide a lambda like the following. It should return a hash. | ||
# config.custom_data_method = lambda { {:some_key => "some_value" } } | ||
|
||
# Add exception class names to the exception_level_filters hash to | ||
# change the level that exception is reported at. Note that if an exception | ||
# has already been reported and logged the level will need to be changed | ||
# via the rollbar interface. | ||
# Valid levels: 'critical', 'error', 'warning', 'info', 'debug', 'ignore' | ||
# 'ignore' will cause the exception to not be reported at all. | ||
# config.exception_level_filters.merge!('MyCriticalException' => 'critical') | ||
# | ||
# You can also specify a callable, which will be called with the exception instance. | ||
# config.exception_level_filters.merge!('MyCriticalException' => lambda { |e| 'critical' }) | ||
|
||
# Enable asynchronous reporting (uses girl_friday or Threading if girl_friday | ||
# is not installed) | ||
# config.use_async = true | ||
# Supply your own async handler: | ||
# config.async_handler = Proc.new { |payload| | ||
# Thread.new { Rollbar.process_payload_safely(payload) } | ||
# } | ||
|
||
# Enable asynchronous reporting (using sucker_punch) | ||
# config.use_sucker_punch | ||
|
||
# Enable delayed reporting (using Sidekiq) | ||
# config.use_sidekiq | ||
# You can supply custom Sidekiq options: | ||
# config.use_sidekiq 'queue' => 'my_queue' | ||
end |