rollbar 2.27.0 → 2.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +25 -0
- data/data/rollbar.snippet.js +1 -1
- data/docs/configuration.md +7 -0
- data/lib/rollbar/configuration.rb +2 -0
- data/lib/rollbar/plugins/delayed_job/plugin.rb +4 -0
- data/lib/rollbar/scrubbers/url.rb +10 -5
- data/lib/rollbar/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 93750693cd5d598ffbfffc97a6fa9d6849b883ff0c6e1fbd2d9f1bc12fe231ce
|
|
4
|
+
data.tar.gz: f6cb9387ee9f3d4555bdcc103d6cd5abc899392335a369ff7fe6201bceb8822d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4028d695ef765ebcc47db502b239153933fd9bab5161aaf6765d8a264c62ab4c60d40fd2bc93985f8eb4eff1838cb749fee6df80ed6baac1af05ecda01b2911c
|
|
7
|
+
data.tar.gz: b9638cb6df1a5647d53cd115fbe708058713d4ea97647c552a82f33b38cb86f11fd4c0b62e9ed83f7f0aa7a732b80fcdaca0d0e04d771f7d89252729aacd8700
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
## Description of the change
|
|
2
|
+
|
|
3
|
+
> Description here
|
|
4
|
+
## Type of change
|
|
5
|
+
- [ ] Bug fix (non-breaking change that fixes an issue)
|
|
6
|
+
- [ ] New feature (non-breaking change that adds functionality)
|
|
7
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
8
|
+
|
|
9
|
+
## Related issues
|
|
10
|
+
|
|
11
|
+
> Fix [#1]()
|
|
12
|
+
## Checklists
|
|
13
|
+
|
|
14
|
+
### Development
|
|
15
|
+
|
|
16
|
+
- [ ] Lint rules pass locally
|
|
17
|
+
- [ ] The code changed/added as part of this pull request has been covered with tests
|
|
18
|
+
- [ ] All tests related to the changed code pass in development
|
|
19
|
+
|
|
20
|
+
### Code review
|
|
21
|
+
|
|
22
|
+
- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
|
|
23
|
+
- [ ] "Ready for review" label attached to the PR and reviewers mentioned in a comment
|
|
24
|
+
- [ ] Changes have been reviewed by at least one other engineer
|
|
25
|
+
- [ ] Issue from task tracker has a link to this pull request
|
data/data/rollbar.snippet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.19.
|
|
1
|
+
!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.19.3/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i<a.length;++i)if("function"==typeof(l=a[i])){l(e);break}}"function"==typeof t&&t(e)}()}})),d.insertBefore(i,s)},i.prototype.wrap=function(r,e,o){try{var n;if(n="function"==typeof e?e:function(){return e||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){o&&"function"==typeof o&&o.apply(this,arguments);try{return r.apply(this,arguments)}catch(o){var e=o;throw e&&("string"==typeof e&&(e=new String(e)),e._rollbarContext=n()||{},e._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=e),e}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(e){return r}};for(var p="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad".split(","),f=0;f<p.length;++f)i.prototype[p[f]]=u(p[f]);r.exports={setupShim:function(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var l=new c(e);return a((function(){e.captureUncaught&&(l._rollbarOldOnError=r.onerror,n.captureUncaughtExceptions(r,l,!0),e.wrapGlobalEventHandlers&&t(r,l,!0)),e.captureUnhandledRejections&&n.captureUnhandledRejections(r,l,!0);var a=e.autoInstrument;return!1!==e.enabled&&(void 0===a||!0===a||"object"==typeof a&&a.network)&&r.addEventListener&&(r.addEventListener("load",l.captureLoad.bind(l)),r.addEventListener("DOMContentLoaded",l.captureDomContentLoaded.bind(l))),r[o]=l,l}))()}},Rollbar:c}},function(r,e,o){"use strict";function n(r,e,o,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null);var t=e.handleUncaughtException.apply(e,n);o&&o.apply(r,n),"anonymous"===t&&(e.anonymousErrorsPending+=1)}r.exports={captureUncaughtExceptions:function(r,e,o){if(r){var t;if("function"==typeof e._rollbarOldOnError)t=e._rollbarOldOnError;else if(r.onerror){for(t=r.onerror;t._rollbarOldOnError;)t=t._rollbarOldOnError;e._rollbarOldOnError=t}e.handleAnonymousErrors();var a=function(){var o=Array.prototype.slice.call(arguments,0);n(r,e,t,o)};o&&(a._rollbarOldOnError=t),r.onerror=a}},captureUnhandledRejections:function(r,e,o){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var o,n,t;try{o=r.reason}catch(r){o=void 0}try{n=r.promise}catch(r){n="[unhandledrejection] error getting `promise` from event"}try{t=r.detail,!o&&t&&(o=t.reason,n=t.promise)}catch(r){}o||(o="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(o,n)};n.belongsToShim=o,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}}}},function(r,e,o){"use strict";function n(r,e,o){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(e,o,t){n.call(this,e,r.wrap(o),t)};t._rollbarOldAdd=n,t.belongsToShim=o,e.addEventListener=t;for(var a=e.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,e,o){a.call(this,r,e&&e._rollbar_wrapped||e,o)};l._rollbarOldRemove=a,l.belongsToShim=o,e.removeEventListener=l}}r.exports=function(r,e,o){if(r){var t,a,l="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(t=0;t<l.length;++t)r[a=l[t]]&&r[a].prototype&&n(e,r[a].prototype,o)}}},function(r,e,o){"use strict";function n(r,e){this.impl=r(e,this),this.options=e,function(r){for(var e=function(r){return function(){var e=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,e)}},o="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad".split(","),n=0;n<o.length;n++)r[o[n]]=e(o[n])}(n.prototype)}n.prototype._swapAndProcessMessages=function(r,e){var o,n,t;for(this.impl=r(this.options);o=e.shift();)n=o.method,t=o.args,this[n]&&"function"==typeof this[n]&&("captureDomContentLoaded"===n||"captureLoad"===n?this[n].apply(this,[t[0],o.ts]):this[n].apply(this,t));return this},r.exports=n},function(r,e,o){"use strict";r.exports=function(r){return function(e){if(!e&&!window._rollbarInitialized){for(var o,n,t=(r=r||{}).globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;o=window._rollbarShims[i++];)n||(n=o.handler),o.handler._swapAndProcessMessages(l,o.messages);window[t]=n,window._rollbarInitialized=!0}}}}]);
|
data/docs/configuration.md
CHANGED
|
@@ -108,6 +108,13 @@ Rollbar notifier.
|
|
|
108
108
|
|
|
109
109
|
The number of job failures before reporting the failure to Rollbar.
|
|
110
110
|
|
|
111
|
+
### async_skip_report_handler
|
|
112
|
+
|
|
113
|
+
**Default** `nil`
|
|
114
|
+
**Example** `-> (job) { job.cron? }`
|
|
115
|
+
|
|
116
|
+
A handler, should respond to `#call`, receives the job and returns a boolean. If true, reporting errors will be skipped. If provided, dj_threshold isn't checked.
|
|
117
|
+
|
|
111
118
|
### enabled
|
|
112
119
|
|
|
113
120
|
**Default** `true`
|
|
@@ -19,6 +19,7 @@ module Rollbar
|
|
|
19
19
|
attr_accessor :disable_core_monkey_patch
|
|
20
20
|
attr_accessor :enable_error_context
|
|
21
21
|
attr_accessor :dj_threshold
|
|
22
|
+
attr_accessor :async_skip_report_handler
|
|
22
23
|
attr_accessor :enabled
|
|
23
24
|
attr_accessor :endpoint
|
|
24
25
|
attr_accessor :environment
|
|
@@ -97,6 +98,7 @@ module Rollbar
|
|
|
97
98
|
@disable_rack_monkey_patch = false
|
|
98
99
|
@enable_error_context = true
|
|
99
100
|
@dj_threshold = 0
|
|
101
|
+
@async_skip_report_handler = nil
|
|
100
102
|
@enabled = nil # set to true when configure is called
|
|
101
103
|
@endpoint = DEFAULT_ENDPOINT
|
|
102
104
|
@environment = nil
|
|
@@ -67,10 +67,7 @@ module Rollbar
|
|
|
67
67
|
|
|
68
68
|
params = decode_www_form(query)
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
# We want this to rebuild array params like foo[]=1&foo[]=2
|
|
73
|
-
URI.escape(CGI.unescape(encoded_query))
|
|
70
|
+
encode_www_form(filter_query_params(params, regex, randomize_scrub_length, scrub_all, whitelist))
|
|
74
71
|
end
|
|
75
72
|
|
|
76
73
|
def decode_www_form(query)
|
|
@@ -78,7 +75,15 @@ module Rollbar
|
|
|
78
75
|
end
|
|
79
76
|
|
|
80
77
|
def encode_www_form(params)
|
|
81
|
-
URI.encode_www_form(params)
|
|
78
|
+
restore_square_brackets(URI.encode_www_form(params))
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def restore_square_brackets(query)
|
|
82
|
+
# We want this to rebuild array params like foo[]=1&foo[]=2
|
|
83
|
+
#
|
|
84
|
+
# URI.encode_www_form follows the spec at https://url.spec.whatwg.org/#concept-urlencoded-serializer
|
|
85
|
+
# and percent encodes square brackets. Here we change them back.
|
|
86
|
+
query.gsub('%5B', '[').gsub('%5D', ']')
|
|
82
87
|
end
|
|
83
88
|
|
|
84
89
|
def filter_query_params(params, regex, randomize_scrub_length, scrub_all, whitelist)
|
data/lib/rollbar/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rollbar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.27.
|
|
4
|
+
version: 2.27.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rollbar, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-08-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Easy and powerful exception tracking for Ruby
|
|
14
14
|
email:
|
|
@@ -19,6 +19,7 @@ extensions: []
|
|
|
19
19
|
extra_rdoc_files: []
|
|
20
20
|
files:
|
|
21
21
|
- ".codeclimate.yml"
|
|
22
|
+
- ".github/pull_request_template.md"
|
|
22
23
|
- ".gitignore"
|
|
23
24
|
- ".gitmodules"
|
|
24
25
|
- ".rubocop.yml"
|
|
@@ -159,8 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
159
160
|
- !ruby/object:Gem::Version
|
|
160
161
|
version: '0'
|
|
161
162
|
requirements: []
|
|
162
|
-
|
|
163
|
-
rubygems_version: 2.7.7
|
|
163
|
+
rubygems_version: 3.1.2
|
|
164
164
|
signing_key:
|
|
165
165
|
specification_version: 4
|
|
166
166
|
summary: Reports exceptions to Rollbar
|