rollbar 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07ce16a5ab6884c863b075b5577833c618d95331
4
- data.tar.gz: 4179b7db73210d42a749530727e16a99851bc932
3
+ metadata.gz: 7601f7e94acde264cb7c32f5ab7360a8f1b60316
4
+ data.tar.gz: 54c7075daf5c090a9cf143f7795931f4744a5e2c
5
5
  SHA512:
6
- metadata.gz: 5c660d4e522c250e09638d12a67c25e13e44bfa8bb3ca6175333ae0be0429432bf8bc3f7a4f5e3a0f502f5be44fde5ff7fe14c1b259bd09ea7b9ca11646f9c3b
7
- data.tar.gz: 5709042d36222c875d3de163d53f073f1367db082c931829f75115624dfa5d4aa77b6a5ba7120277afa416494048be2bd568a70527fdc4b86430287249a936e7
6
+ metadata.gz: c9b0da8ae42a915de193b95d63f9e3e60325af0aa799c060dc0453258e602ee3b1330552a68429237bee75c5c6bf18b442623bb53a6efd74a394675d8c7cf7d2
7
+ data.tar.gz: 2d360c8176626f5a7fb15cfbf8d6ec48801b68970c4304afc898f6ea8fec785d128e347be2988814c481c4c57f65dc8b6f337322533ccd10b98a9afc87128a6a
@@ -1,3 +1,4 @@
1
+ sudo: false
1
2
  language: ruby
2
3
  # Broken bundler on travis CI - https://github.com/bundler/bundler/issues/2784
3
4
  before_install:
@@ -1,78 +1,151 @@
1
1
  # Change Log
2
2
 
3
- **1.2.7**
3
+ ## 1.2.8
4
+
5
+ New features:
6
+
7
+ - Add config option to not monkeypatch `Rack::Builder`. See [#169](https://github.com/rollbar/rollbar-gem/pull/169)
8
+ - Track server PID. See [#171](https://github.com/rollbar/rollbar-gem/pull/171)
9
+
10
+
11
+ Bug fixes:
12
+
13
+ - Remove internal calls to deprecated methods. See [#166](https://github.com/rollbar/rollbar-gem/pull/166)
14
+ - Fix an intermittently failing test. See [#167](https://github.com/rollbar/rollbar-gem/pull/167)
15
+ - Fix configuration issue when an initializer calls `Thread.new` before Rollbar is initialized. See [#170](https://github.com/rollbar/rollbar-gem/pull/170) and [#168](https://github.com/rollbar/rollbar-gem/pull/168)
16
+ - Fix infinite loop with cyclic inner exceptions. See [#172](https://github.com/rollbar/rollbar-gem/pull/172)
17
+
18
+
19
+ ## 1.2.7
20
+
21
+ Bug fixes:
4
22
  - Restore `exception_level_filters` feature, which was inadvertently removed in 1.2.0. See [#160](https://github.com/rollbar/rollbar-gem/pull/160)
5
23
  - Fix bug where rollbar_url incorrectly handled comma-separated X-Forwarded-Proto header values. See [#112](https://github.com/rollbar/rollbar-gem/issues/112)
6
24
 
7
- **1.2.6**
25
+
26
+ ## 1.2.6
27
+
28
+ Bug fixes:
29
+
8
30
  - Fix bug in non-Rails environments. See [#155](https://github.com/rollbar/rollbar-gem/pull/155)
9
31
  - Fix intermittent test failures
10
32
 
11
- **1.2.5**
33
+
34
+ ## 1.2.5
35
+
36
+ Bug fixes:
37
+
12
38
  - Fix issues handling hashes, arrays, and other values as the raw POST body. See [#153](https://github.com/rollbar/rollbar-gem/pull/153)
13
39
 
14
- **1.2.4**
40
+
41
+ ## 1.2.4
42
+
43
+ Bug fixes:
44
+
15
45
  - Fix issue where requiring 'rack' unnecessarily broke things in non-rack apps. See [#150](https://github.com/rollbar/rollbar-gem/pull/150)
16
46
 
17
- **1.2.3**
47
+
48
+ ## 1.2.3
49
+
50
+ Bug fixes:
51
+
18
52
  - Bring back `enforce_valid_utf8`, which got lost in the 1.2.0 upgrade. See [#148](https://github.com/rollbar/rollbar-gem/pull/148)
19
53
  - Fix bug with raw post extraction for application/json requests. See [#147](https://github.com/rollbar/rollbar-gem/pull/147)
20
54
 
21
- **1.2.2**
55
+
56
+ ## 1.2.2
57
+
58
+ Bug fixes:
59
+
22
60
  - Fix issue with delayed_job and Rollbar.report_exception (bug introduced in 1.2.0). See [#145](https://github.com/rollbar/rollbar-gem/issues/145)
23
61
  - Explicitly require 'rack' in request_data_extractor. See [#144](https://github.com/rollbar/rollbar-gem/pull/144)
24
62
 
25
- **1.2.1**
63
+
64
+ ## 1.2.1
65
+
66
+ Bug fixes:
67
+
26
68
  - Revert change made as part of 1.2.0 where all procs in the payload would be evaluated. See [#143](https://github.com/rollbar/rollbar-gem/pull/143).
27
69
 
28
- **1.2.0**
70
+
71
+ ## 1.2.0
72
+
73
+ New features:
74
+
29
75
  - Added new, much nicer interface for sending exceptions and messages to Rollbar. This is a backwards-compatible release: the old interface (`report_message`, `report_exception`, `report_message_with_request`) is deprecated but will continue to work at least until 2.0.
30
76
 
31
77
  See the docs for [basic](https://github.com/rollbar/rollbar-gem#caught-exceptions-and-messages) and [advanced](https://github.com/rollbar/rollbar-gem#advanced-usage) usage for a guide to the new interface. If you've used [rollbar.js](https://github.com/rollbar/rollbar.js), it will be familiar.
32
78
 
33
- **1.1.0**
79
+ ---
80
+
81
+ ## 1.1.0
82
+
83
+ New features:
84
+
34
85
  - Support nested exceptions for Ruby 2.1. See [#136](https://github.com/rollbar/rollbar-gem/pull/136). NOTE: for exceptions that have causes, this will change how they are grouped in Rollbar. If you have custom grouping rules, they will need to be updated to replace `body.trace.exception` with `body.trace_chain[0].exception` to maintain the same behavior for these exceptions.
35
86
  - New feature: `failover_handlers`. You can specify a list of async handlers, which will be tried in sequence upon failure. See [#135](https://github.com/rollbar/rollbar-gem/pull/135).
87
+
88
+ Bug fixes:
89
+
36
90
  - Fix handling of utf8 sequences in payload symbols. See [#131](https://github.com/rollbar/rollbar-gem/pull/131). Thanks [@kroky](https://github.com/kroky) for the fix and [@jondeandres](https://github.com/jondeandres) for reviewing.
37
91
  - Fix logic bugs in assignments for `scrub_fields` and `scrub_headers`. See [#137](https://github.com/rollbar/rollbar-gem/pull/137)
38
92
 
39
- **1.0.1**
93
+ ---
94
+
95
+ ## 1.0.1
96
+
97
+ Bug fixes:
98
+
40
99
  - Use the payload's access token for the X-Rollbar-Access-Token header, instead of the configured access token. Fixes an issue where payloads would be reported into the wrong project when sent via Resque. See [#128](https://github.com/rollbar/rollbar-gem/pull/128). Thanks to [@jondeandres](https://github.com/jondeandres) for the fix.
41
100
 
42
- **1.0.0**
43
- - Clean up some unused requires
101
+ ## 1.0.0
102
+
103
+ Bug fixes:
104
+
44
105
  - Strip out invalid UTF-8 characters from payload keys/values, fixes [#85](https://github.com/rollbar/rollbar-gem/issues/85)
106
+
107
+
108
+ Misc:
109
+
110
+ - Clean up some unused requires
45
111
  - Bumping to 1.0 due to the suggestion in [#119](https://github.com/rollbar/rollbar-gem/issues/119)
46
112
 
47
- **0.13.2**
113
+ ---
114
+
115
+ ## 0.13.2
116
+
48
117
  - Sidekiq payload is no longer mutated when Rollbar reports a Sidekiq job exception
49
118
  - Fix sucker_punch async reporting when using a forking application server such as Unicorn (`preload_app true`). Jobs are now instantiated for every report instead of a reused global job instance
50
119
 
51
- **0.13.1**
120
+
121
+ ## 0.13.1
52
122
  - Silence warning when using project_gems= with regexp [#120](https://github.com/rollbar/rollbar-gem/pull/120)
53
123
 
54
- **0.13.0**
124
+
125
+ ## 0.13.0
126
+
55
127
  - Hook for delayed_job no longer a plugin, will now only ever be initialized once
56
128
  - New configuration option `delayed_job_enabled` that defaults to true
57
129
  - Potentially breaking change if using delayed_job: if you disabled the delayed_job plugin previously, please remove that code and instead set the new configuration option `delayed_job_enabled` to false
58
130
 
59
- **0.12.20**
131
+
132
+ ## 0.12.20
60
133
  - Fix asynchronous reports with sidekiq version < 2.3.2
61
134
  - Support for specifying multiple project_gems with regex [#114](https://github.com/rollbar/rollbar-gem/pull/114)
62
135
 
63
- **0.12.19**
136
+ ## 0.12.19
64
137
  - Fix rake test task in production
65
138
  - Report an additional simple error message in the rake test task
66
139
 
67
- **0.12.18**
140
+ ## 0.12.18
68
141
  - Insert RollbarRequestStore middleware at the end in case the ActiveRecord ConnectionManagement middleware isn't used
69
142
  - Scope Capistrano 3 task by server role [#110](https://github.com/rollbar/rollbar-gem/pull/110)
70
143
 
71
- **0.12.17**
144
+ ## 0.12.17
72
145
  - Replace usage of `puts` with a configurable logger in different areas of the notifier
73
146
  - Fix error in `RollbarRequestStore` when `rollbar_person_data` isn't defined for a controller
74
147
 
75
- **0.12.16**
148
+ ## 0.12.16
76
149
  - Scrub fields are now converted to a regular expression for broader param name matching
77
150
  - Save ActionDispatch request_id in reports if present
78
151
  - Added proper Sidekiq 3 error handler
@@ -80,279 +153,279 @@
80
153
  - Added a configurable request timeout for reports (defaults to 3 seconds)
81
154
  - Fix circular json exception handling in Rails 4.1
82
155
 
83
- **0.12.15**
156
+ ## 0.12.15
84
157
  - Send X-Rollbar-Access-Token http header along with payloads
85
158
 
86
- **0.12.14**
159
+ ## 0.12.14
87
160
  - Added ability to scrub request headers
88
161
  - Added flag to disable reporting of Delayed::Job job data when handling uncaught exceptions that happen in jobs
89
162
  - New `report_message_with_request` that allows reporting request and person data, similar to `report_exception`
90
163
  - Changed various exception handlers to catch `Exception` subclasses instead of only `StandardError`s
91
164
  - Added Capistrano 3 support
92
165
 
93
- **0.12.13**
166
+ ## 0.12.13
94
167
  - Add a little more debugging information for 'payload too large' errors
95
168
  - Pushing new gem to fix errant 32kb size limit in the rubygems copy of 0.12.12
96
169
 
97
- **0.12.12**
170
+ ## 0.12.12
98
171
  - Changes to support Engine Yard add-on setup
99
172
 
100
- **0.12.11**
173
+ ## 0.12.11
101
174
  - Raise payload size limit to 128k
102
175
 
103
- **0.12.10**
176
+ ## 0.12.10
104
177
  - Log payloads that are too large to be sent to Rollbar
105
178
  - Don't record controller context if request route info isn't readily available (ex. non-Rails)
106
179
 
107
- **0.12.9**
180
+ ## 0.12.9
108
181
  - Fixed delayed job regression introduced in 0.12.5 by re-raising caught exceptions
109
182
  - Removed Active Support call introduced in 0.12.6 to remove rails dependency in `report_exception`
110
183
 
111
- **0.12.8**
184
+ ## 0.12.8
112
185
  - Added funcitonality to walk the payload and truncate strings to attempt to reduce size if the payload is too large (more than 32kb total)
113
186
 
114
- **0.12.7**
187
+ ## 0.12.7
115
188
  - Fix error reporting errors when route controller or action is nil (bug introduced in 0.12.4)
116
189
 
117
- **0.12.6**
190
+ ## 0.12.6
118
191
  - Added [#78](https://github.com/rollbar/rollbar-gem/pull/78), added configuration option to ignore specific person exceptions
119
192
 
120
- **0.12.5**
193
+ ## 0.12.5
121
194
  - Fixed SIGSEGV with the delayed_job plugin and Ruby 2.1.0
122
195
 
123
- **0.12.4**
196
+ ## 0.12.4
124
197
  - Record controller context (controller#action) in reported items
125
198
 
126
- **0.12.3**
199
+ ## 0.12.3
127
200
  - Change rollbar_request_store middleware to only grab required person data properties by using rollbar_person_data
128
201
 
129
- **0.12.2**
202
+ ## 0.12.2
130
203
  - Added ability to specify level for manually reported exceptions
131
204
 
132
- **0.12.1**
205
+ ## 0.12.1
133
206
  - Fix syntax error in `config.use_sidekiq` usage example
134
207
 
135
- **0.12.0**
208
+ ## 0.12.0
136
209
  - Added [#73](https://github.com/rollbar/rollbar-gem/pull/73), enhanced Sidekiq and SuckerPunch configuration. NOTE: The old `Rollbar::Configuration#use_sidekiq=` and `Rollbar::Configuration#use_sucker_punch=` methods are now deprecated, see the docs for updated usage information.
137
210
 
138
- **0.11.8**
211
+ ## 0.11.8
139
212
  - Make sure the person method exists for the controller before trying to extract person data
140
213
 
141
- **0.11.7**
214
+ ## 0.11.7
142
215
  - Remove ActiveRecord railtie requirement introduced in 0.11.6
143
216
 
144
- **0.11.6**
217
+ ## 0.11.6
145
218
  - Adding new middleware that grabs possible database-hitting person data before the rake connection pool cleanup middleware
146
219
 
147
- **0.11.5**
220
+ ## 0.11.5
148
221
  - Fix rake test task when Authlogic is present
149
222
 
150
- **0.11.4**
223
+ ## 0.11.4
151
224
  - Respect different proxy headers when building the request url
152
225
 
153
- **0.11.3**
226
+ ## 0.11.3
154
227
  - Make sure the environment is valid at item sending time so that it isn't set incorrectly during configuration
155
228
 
156
- **0.11.2**
229
+ ## 0.11.2
157
230
  - Test rake task now works properly if force_ssl is true
158
231
 
159
- **0.11.1**
232
+ ## 0.11.1
160
233
  - `config.exception_level_filters` can now take a callable instead of a string. The exception instance will be passed to the callable.
161
234
 
162
- **0.11.0**
235
+ ## 0.11.0
163
236
  - Changed default environment name from `'production'` to `'unspecified'`
164
237
 
165
- **0.10.14**
238
+ ## 0.10.14
166
239
  - Fixed compatability issue with better_errors 1.0
167
240
 
168
- **0.10.13**
241
+ ## 0.10.13
169
242
  - Added `code_version` configuration setting
170
243
 
171
- **0.10.12**
244
+ ## 0.10.12
172
245
  - Exclude HTTP_COOKIE header (since cookies are already included in parsed form)
173
246
 
174
- **0.10.11**
247
+ ## 0.10.11
175
248
  - Fix usage of custom Sidekiq options
176
249
 
177
- **0.10.10**
250
+ ## 0.10.10
178
251
  - Add support for sucker_punch asynchronous handling
179
252
 
180
- **0.10.9**
253
+ ## 0.10.9
181
254
  - Fix regression introduced in 0.10.7 when ActiveRecord is not present.
182
255
 
183
- **0.10.8**
256
+ ## 0.10.8
184
257
  - Better handling of internal errors. Internal errors (errors that occur while reporting something to Rollbar) are now themselves reported to Rollbar. If that fails, a failsafe message will be reported, and if that fails, the error will be logged as it is now.
185
258
  - Fix bug reporting exceptions with backtraces containing frames that don't match our regex.
186
259
 
187
- **0.10.7**
260
+ ## 0.10.7
188
261
  - Add ability to report form validation errors
189
262
  - Add MIT license to gemspec
190
263
 
191
- **0.10.6**
264
+ ## 0.10.6
192
265
  - Fix json dump when rack.errors is an IO stream
193
266
 
194
- **0.10.5**
267
+ ## 0.10.5
195
268
  - Add built-in support for Sidekiq as async handler
196
269
 
197
- **0.10.4**
270
+ ## 0.10.4
198
271
  - Fix exception in the exception catcher when Rollbar is disabled
199
272
 
200
- **0.10.3**
273
+ ## 0.10.3
201
274
  - Rework how request params are extracted so that json params are properly extracted in rails 4.0
202
275
  - Fix rollbar:test rake task
203
276
 
204
- **0.10.2**
277
+ ## 0.10.2
205
278
  - Require hooks at configuration time instead of gem load time
206
279
 
207
- **0.10.1**
280
+ ## 0.10.1
208
281
  - Fix regression in 0.10.0 reporting exceptions in development environments and rails < 3.2 apps.
209
282
 
210
- **0.10.0**
283
+ ## 0.10.0
211
284
  - Fixed bug causing duplicate reports when used inside Rails in production with the default error pages. Bumping version to 0.10.0 in case this turns out to be backwards-incompatible for some use cases (i.e. for applications that were relying on the duplicate report that has now been removed).
212
285
 
213
- **0.9.14**
286
+ ## 0.9.14
214
287
  - Added `custom_data_method` config option. If set, it should be a lambda that returns a hash.
215
288
  - Changed initializer template to disable reporting from the 'test' environment.
216
289
 
217
- **0.9.13**
290
+ ## 0.9.13
218
291
  - Add test for PUT params
219
292
  - Parse json params when content-type is application/json
220
293
  - Fix concurrency issue
221
294
  - Remove redundant `GET` and `POST` keys from request payload (they're already included in `params`)
222
295
 
223
- **0.9.12**
296
+ ## 0.9.12
224
297
  - Fix compatibility issue with Rails 4 / Ruby 2 (thanks [johnknott](https://github.com/johnknott))
225
298
 
226
- **0.9.11**
299
+ ## 0.9.11
227
300
  - Provide a default environment name when used outside of Rails and none is set
228
301
 
229
- **0.9.10**
302
+ ## 0.9.10
230
303
  - Add :secret_token to default scrub_fields list
231
304
  - Session params are now scrubbed
232
305
 
233
- **0.9.9**
306
+ ## 0.9.9
234
307
  - Fix capistrano recipe on 1.9.2 ([#36](https://github.com/rollbar/rollbar-gem/pull/36))
235
308
  - Add example of disable "test" env to initializer template
236
309
 
237
- **0.9.8**
310
+ ## 0.9.8
238
311
  - Fix bug introduced in 0.9.0 where setting `config.enabled = false` in `config/initializers/rollbar.rb` would be overwritten by subsequent calls to `Rollbar.configure` (as happens normally when using inside Rails).
239
312
 
240
- **0.9.7**
313
+ ## 0.9.7
241
314
  - Use `include?` instead of `in?` for filtering (see [#34](https://github.com/rollbar/rollbar-gem/pull/34))
242
315
 
243
- **0.9.6**
316
+ ## 0.9.6
244
317
  - Fix for Rails 4 support
245
318
 
246
- **0.9.5**
319
+ ## 0.9.5
247
320
  - Support for configuring the access token with an environment variable.
248
321
 
249
- **0.9.4**
322
+ ## 0.9.4
250
323
  - Fixed issue using rollbar-gem outside of Rails
251
324
  - Clarified the "details: " link log message
252
325
 
253
- **0.9.3**
326
+ ## 0.9.3
254
327
  - Added configuration setting to specify gems that should be considered part of the Rollbar project, making frames from these gems show up automatically uncollapsed in tracebacks appearing on the website.
255
328
 
256
- **0.9.2**
329
+ ## 0.9.2
257
330
  - Added [Capistrano integration](https://github.com/rollbar/rollbar-gem/pull/27)
258
331
 
259
- **0.9.1**
332
+ ## 0.9.1
260
333
  - Add support to play nicely with Better Errors.
261
334
 
262
- **0.9.0**
335
+ ## 0.9.0
263
336
  - Behavior change: start configuration as `@enabled = false`, and set to true when `configure` is called. This addresses an issue using Rollbar without the environment initialized. Such reports would always fail (since there would be no access token), but now they won't be attempted.
264
337
 
265
- **0.8.3**
338
+ ## 0.8.3
266
339
  - Relax multi_json dependency to 1.5.0
267
340
 
268
- **0.8.2**
341
+ ## 0.8.2
269
342
  - Adding back rake task exception reporting after fixing load order issue
270
343
 
271
- **0.8.1**
344
+ ## 0.8.1
272
345
  - Reverting rake task exception reporting until we can track down a load order issue reported by a few users
273
346
 
274
- **0.8.0**
347
+ ## 0.8.0
275
348
  - Rename to rollbar
276
349
 
277
- **0.7.1**
350
+ ## 0.7.1
278
351
  - Fix ratchetio:test rake task when project base controller is not called ApplicationController
279
352
 
280
- **0.7.0**
353
+ ## 0.7.0
281
354
  - Exceptions in Rake tasks are now automatically reported.
282
355
 
283
- **0.6.4**
356
+ ## 0.6.4
284
357
  - Bump multi_json dependency version to 1.6.0
285
358
 
286
- **0.6.3**
359
+ ## 0.6.3
287
360
  - Bump multi_json dependency version to 1.5.1
288
361
 
289
- **0.6.2**
362
+ ## 0.6.2
290
363
  - Added EventMachine support
291
364
 
292
- **0.6.1**
365
+ ## 0.6.1
293
366
  - Added a log message containing a link to the instance. Copy-paste the link into your browser to view its details in Ratchet.
294
367
  - Ratchetio.report_message now returns 'ignored' or 'error' instead of nil when a message is not reported for one of those reasons, for consistency with Ratchetio.report_exception.
295
368
 
296
- **0.6.0**
369
+ ## 0.6.0
297
370
  - POSSIBLE BREAKING CHANGE: Ratchetio.report_exception now returns 'ignored', 'disabled', or 'error' instead of nil when the exception is not reported for one of those reasons. It still returns the payload upon success.
298
371
  - Request data is now parsed from the rack environment instead of from within the controller, addressing issue #10.
299
372
  - Add Sidekiq middleware for catching workers' exceptions
300
373
  - Replaced activesupport dependency with multi_json
301
374
 
302
- **0.5.5**
375
+ ## 0.5.5
303
376
  - Added activesupport dependency for use without Rails
304
377
 
305
- **0.5.4**
378
+ ## 0.5.4
306
379
  - Added new default scrub params
307
380
 
308
- **0.5.3**
381
+ ## 0.5.3
309
382
  - Add `Ratchetio.silenced`; which allows disabling reporting for a given block. See README for usage.
310
383
 
311
- **0.5.2**
384
+ ## 0.5.2
312
385
  - Fix compat issue with delayed_job below version 3. Exceptions raised by delayed_job below version 3 will not be automatically caught; upgrade to v3 or catch and report by hand.
313
386
 
314
- **0.5.1**
387
+ ## 0.5.1
315
388
  - Save the exception uuid in `env['ratchetio.exception_uuid']` for display in user-facing error pages.
316
389
 
317
- **0.5.0**
390
+ ## 0.5.0
318
391
  - Add support to report exceptions raised in delayed_job.
319
392
 
320
- **0.4.11**
393
+ ## 0.4.11
321
394
  - Allow exceptions with no backtrace (e.g. StandardError subclasses)
322
395
 
323
- **0.4.10**
396
+ ## 0.4.10
324
397
  - Fix compatability issue with ruby 1.8
325
398
 
326
- **0.4.9**
399
+ ## 0.4.9
327
400
  - Start including a UUID in reported exceptions
328
401
  - Fix issue with scrub_fields, and add `:password_confirmation` to the default list
329
402
 
330
- **0.4.8**
403
+ ## 0.4.8
331
404
  - Add ability to send reports asynchronously, using girl_friday or Threading by default.
332
405
  - Add ability to save reports to a file (for use with ratchet-agent) instead of sending across to Ratchet servers.
333
406
 
334
- **0.4.7**
407
+ ## 0.4.7
335
408
  - Sensitive params now scrubbed out of requests. Param name list is customizable via the `scrub_fields` config option.
336
409
 
337
- **0.4.6**
410
+ ## 0.4.6
338
411
  - Add support to play nicely with Goalie.
339
412
 
340
- **0.4.5**
413
+ ## 0.4.5
341
414
  - Add `default_logger` config option. It should be a lambda that will return the logger to use if no other logger is configured (i.e. no logger is set by the Railtie hook). Default: `lambda { Logger.new(STDERR) }`
342
415
 
343
- **0.4.4**
416
+ ## 0.4.4
344
417
  - Add `enabled` runtime config flag. When `false`, no data (messages or exceptions) will be reported.
345
418
 
346
- **0.4.3**
419
+ ## 0.4.3
347
420
  - Add RSpec test suite. A few minor code changes.
348
421
 
349
- **0.4.2**
422
+ ## 0.4.2
350
423
  - Add "ignore" filter level to completely ignore exceptions by class.
351
424
 
352
- **0.4.1**
425
+ ## 0.4.1
353
426
  - Recursively filter files out of the params hash. Thanks to [trisweb](https://github.com/trisweb) for the pull request.
354
427
 
355
- **0.4.0**
428
+ ## 0.4.0
356
429
 
357
430
  - Breaking change to make the "person" more configurable. If you were previously relying on your `current_member` method being called to return the person object, you will need to add the following line to `config/initializers/ratchetio.rb`:
358
431
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rollbar notifier for Ruby [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v1.2.7)](https://travis-ci.org/rollbar/rollbar-gem/branches)
1
+ # Rollbar notifier for Ruby [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v1.2.8)](https://travis-ci.org/rollbar/rollbar-gem/branches)
2
2
 
3
3
  <!-- RemoveNext -->
4
4
  Ruby gem for reporting exceptions, errors, and log messages to [Rollbar](https://rollbar.com).
@@ -9,7 +9,7 @@ Ruby gem for reporting exceptions, errors, and log messages to [Rollbar](https:/
9
9
 
10
10
  Add this line to your application's Gemfile:
11
11
 
12
- gem 'rollbar', '~> 1.2.7'
12
+ gem 'rollbar', '~> 1.2.8'
13
13
 
14
14
  And then execute:
15
15
 
@@ -51,7 +51,7 @@ $ heroku config:add ROLLBAR_ACCESS_TOKEN=POST_SERVER_ITEM_ACCESS_TOKEN
51
51
 
52
52
  That's all you need to use Rollbar with Rails.
53
53
 
54
- ### If not using Rails
54
+ ### If using Rack
55
55
 
56
56
  Be sure to initialize Rollbar with your access token somewhere during startup:
57
57
 
@@ -67,6 +67,28 @@ end
67
67
  <!-- RemoveNextIfProject -->
68
68
  Be sure to replace ```POST_SERVER_ITEM_ACCESS_TOKEN``` with your project's ```post_server_item``` access token, which you can find in the Rollbar.com interface.
69
69
 
70
+ This monkey patches `Rack::Builder` to work with Rollbar automatically.
71
+
72
+ For more control, disable the monkey patch in the rollbar configuration:
73
+
74
+ ```ruby
75
+ Rollbar.configure do |config|
76
+ config.disable_monkey_patch = true
77
+ # other configuration settings
78
+ # ...
79
+ end
80
+ ```
81
+
82
+ Then mount the middleware in your app, like:
83
+
84
+ ```ruby
85
+ class MyApp < Sinatra::Base
86
+ use Rollbar::Middleware::Sinatra
87
+ # other middleware/etc
88
+ # ...
89
+ end
90
+ ```
91
+
70
92
  ## Test your installation
71
93
 
72
94
  To confirm that it worked, run:
@@ -499,6 +521,21 @@ Some users have reported problems with Zeus when ```rake``` was not explicitly i
499
521
 
500
522
  You can find upgrading notes in [UPGRADING.md](UPGRADING.md).
501
523
 
524
+ ## Issues
525
+
526
+ We've received some issues from users having problems when they use [Oj](https://github.com/ohler55/oj) as the JSON serialization library with [MultiJson](https://github.com/intridea/multi_json). To avoid these problems, we recommend upgrading to Oj version 2.11.0:
527
+
528
+ ```ruby
529
+ gem 'oj', '~> 2.11.0'
530
+ ```
531
+
532
+ If you are using Oj but cannot upgrade, you can work around this with:
533
+
534
+ ```ruby
535
+ require 'json'
536
+ MultiJson.use(:json_common)
537
+ ```
538
+
502
539
 
503
540
  ## Help / Support
504
541
 
data/THANKS.md CHANGED
@@ -15,6 +15,7 @@ Huge thanks to the following contributors (by github username). For the most up-
15
15
  - [fab](https://github.com/fab)
16
16
  - [firstbanco](https://github.com/firstbanco)
17
17
  - [Florent2](https://github.com/Florent2)
18
+ - [gersmann](https://github.com/gersmann)
18
19
  - [grosser](https://github.com/grosser)
19
20
  - [ixti](https://github.com/ixti)
20
21
  - [jeremyvdw](https://github.com/jeremyvdw)
@@ -25,13 +26,16 @@ Huge thanks to the following contributors (by github username). For the most up-
25
26
  - [kavu](https://github.com/kavu)
26
27
  - [kroky](https://github.com/kroky)
27
28
  - [lanej](https://github.com/lanej)
29
+ - [lesliev-figured](https://github.com/lesliev-figured)
28
30
  - [magnolia-fan](https://github.com/magnolia-fan)
29
31
  - [mauricio](https://github.com/mauricio)
30
32
  - [metaskills](https://github.com/metaskills)
31
33
  - [miloops](https://github.com/miloops)
32
34
  - [mipearson](https://github.com/mipearson)
33
35
  - [mrgordon](https://github.com/mrgordon)
36
+ - [nikolai-b](https://github.com/nikolai-b)
34
37
  - [notahat](https://github.com/notahat)
38
+ - [pedro](https://github.com/pedro)
35
39
  - [petergoldstein](https://github.com/petergoldstein)
36
40
  - [pmen](https://github.com/pmen)
37
41
  - [rogercampos](https://github.com/rogercampos)
@@ -19,7 +19,6 @@ require 'rollbar/util'
19
19
  require 'rollbar/railtie' if defined?(Rails)
20
20
  require 'rollbar/delay/girl_friday'
21
21
  require 'rollbar/delay/thread'
22
- require 'rollbar/core_ext/thread'
23
22
 
24
23
  unless ''.respond_to? :encode
25
24
  require 'iconv'
@@ -349,9 +348,11 @@ module Rollbar
349
348
 
350
349
  def trace_chain(exception)
351
350
  traces = [trace_data(exception)]
351
+ visited = [exception]
352
352
 
353
- while exception.respond_to?(:cause) && (cause = exception.cause)
353
+ while exception.respond_to?(:cause) && (cause = exception.cause) && !visited.include?(cause)
354
354
  traces << trace_data(cause)
355
+ visited << cause
355
356
  exception = cause
356
357
  end
357
358
 
@@ -371,6 +372,7 @@ module Rollbar
371
372
  }
372
373
  data[:root] = configuration.root.to_s if configuration.root
373
374
  data[:branch] = configuration.branch if configuration.branch
375
+ data[:pid] = Process.pid
374
376
 
375
377
  data
376
378
  end
@@ -662,6 +664,9 @@ module Rollbar
662
664
  yield(configuration)
663
665
 
664
666
  require_hooks
667
+ # This monkey patch is always needed in order
668
+ # to use Rollbar.scoped
669
+ require 'rollbar/core_ext/thread'
665
670
  end
666
671
 
667
672
  def reconfigure
@@ -679,6 +684,7 @@ module Rollbar
679
684
  end
680
685
 
681
686
  def require_hooks
687
+ return if configuration.disable_monkey_patch
682
688
  wrap_delayed_worker
683
689
 
684
690
  require 'rollbar/sidekiq' if defined?(Sidekiq)
@@ -15,7 +15,7 @@ module BetterErrors
15
15
  controller = env['action_controller.instance']
16
16
  request_data = controller.rollbar_request_data rescue nil
17
17
  person_data = controller.rollbar_person_data rescue nil
18
- exception_data = Rollbar.report_exception(exception, request_data, person_data)
18
+ exception_data = Rollbar.scope(:request => request_data, :person => person_data).error(exception)
19
19
  rescue => e
20
20
  Rollbar.log_warning "[Rollbar] Exception while reporting exception to Rollbar: #{e}"
21
21
  end
@@ -10,6 +10,7 @@ module Rollbar
10
10
  attr_accessor :custom_data_method
11
11
  attr_accessor :delayed_job_enabled
12
12
  attr_accessor :default_logger
13
+ attr_accessor :disable_monkey_patch
13
14
  attr_accessor :dj_threshold
14
15
  attr_accessor :enabled
15
16
  attr_accessor :endpoint
@@ -47,6 +48,7 @@ module Rollbar
47
48
  @custom_data_method = nil
48
49
  @default_logger = lambda { Logger.new(STDERR) }
49
50
  @delayed_job_enabled = true
51
+ @disable_monkey_patch = false
50
52
  @dj_threshold = 0
51
53
  @enabled = nil # set to true when configure is called
52
54
  @endpoint = DEFAULT_ENDPOINT
@@ -3,14 +3,14 @@ module Rollbar
3
3
  def self.wrap_worker
4
4
  return if @wrapped
5
5
  @wrapped = true
6
-
6
+
7
7
  ::Delayed::Worker.lifecycle.around(:invoke_job) do |job, *args, &block|
8
8
  begin
9
9
  block.call(job, *args)
10
10
  rescue Exception => e
11
11
  if job.attempts >= ::Rollbar.configuration.dj_threshold
12
12
  data = ::Rollbar.configuration.report_dj_data ? job : nil
13
- ::Rollbar.report_exception(e, data)
13
+ ::Rollbar.scope(:request => data).error(e)
14
14
  end
15
15
  raise e
16
16
  end
@@ -10,11 +10,11 @@ module Goalie
10
10
  controller = env['action_controller.instance']
11
11
  request_data = controller.rollbar_request_data rescue nil
12
12
  person_data = controller.rollbar_person_data rescue nil
13
- exception_data = Rollbar.report_exception(exception, request_data, person_data)
13
+ exception_data = Rollbar.scope(:request => request_data, :person => person_data).error(exception)
14
14
  rescue => e
15
- Rollbar.log_warning "[Rollbar] Exception while reporting exception to Rollbar: #{e}"
15
+ Rollbar.log_warning "[Rollbar] Exception while reporting exception to Rollbar: #{e}"
16
16
  end
17
-
17
+
18
18
  # if an exception was reported, save uuid in the env
19
19
  # so it can be displayed to the user on the error page
20
20
  if exception_data.is_a?(Hash)
@@ -3,8 +3,9 @@ require 'rake'
3
3
  module Rake
4
4
  class Application
5
5
  alias_method :orig_display_error_message, :display_error_message
6
+
6
7
  def display_error_message(ex)
7
- Rollbar.report_exception(ex)
8
+ Rollbar.error(ex)
8
9
  orig_display_error_message(ex)
9
10
  end
10
11
  end
@@ -19,7 +19,7 @@ namespace :rollbar do
19
19
  exit
20
20
  end
21
21
 
22
- Rollbar.report_message("Test error from rollbar:test", "error")
22
+ Rollbar.error('Test error from rollbar:test')
23
23
 
24
24
  begin
25
25
  require './app/controllers/application_controller'
@@ -10,8 +10,9 @@ if Sidekiq::VERSION < '3'
10
10
  yield
11
11
  rescue Exception => e
12
12
  params = msg.reject{ |k| PARAM_BLACKLIST.include?(k) }
13
+ scope = { :request => { :params => params } }
13
14
 
14
- Rollbar.report_exception(e, :params => params)
15
+ Rollbar.scope(scope).report_exception(e)
15
16
  raise
16
17
  end
17
18
  end
@@ -27,8 +28,9 @@ else
27
28
  Sidekiq.configure_server do |config|
28
29
  config.error_handlers << Proc.new do |e, context|
29
30
  params = context.reject{ |k| PARAM_BLACKLIST.include?(k) }
30
-
31
- Rollbar.report_exception(e, :params => params)
31
+ scope = { :request => { :params => params } }
32
+
33
+ Rollbar.scope(scope).error(e)
32
34
  end
33
35
  end
34
36
  end
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = "1.2.7"
2
+ VERSION = "1.2.8"
3
3
  end
@@ -19,7 +19,7 @@ class HomeController < ApplicationController
19
19
  begin
20
20
  foo = bar
21
21
  rescue => e
22
- Rollbar.report_exception(e)
22
+ Rollbar.error(e)
23
23
  end
24
24
  render :json => {}
25
25
  end
@@ -1,4 +1,5 @@
1
1
  require 'rollbar/rails'
2
+
2
3
  Rollbar.configure do |config|
3
4
  config.access_token = 'aaaabbbbccccddddeeeeffff00001111'
4
5
  config.request_timeout = 60
@@ -18,4 +19,4 @@ Rollbar.configure do |config|
18
19
  # Valid levels: 'critical', 'error', 'warning', 'info', 'debug', 'ignore'
19
20
  # 'ignore' will cause the exception to not be reported at all.
20
21
  # config.exception_level_filters.merge!('MyCriticalException' => 'critical')
21
- end
22
+ end unless ENV['SKIP_DUMMY_ROLLBAR']
@@ -33,11 +33,10 @@ describe Rollbar::Delayed, :reconfigure_notifier => true do
33
33
  end
34
34
 
35
35
  it 'sends the exception' do
36
+ expect_any_instance_of(Rollbar::Notifier).to receive(:error).with(kind_of(FailingJob::TestException))
37
+
36
38
  expect do
37
39
  Delayed::Job.enqueue(FailingJob.new)
38
40
  end.to raise_error(FailingJob::TestException)
39
-
40
- last_report = Rollbar.last_report
41
- expect(last_report[:request]).to be_kind_of(DummyBackend::Job)
42
41
  end
43
42
  end
@@ -23,7 +23,24 @@ describe Rollbar do
23
23
  end
24
24
  end
25
25
 
26
- let(:configuration) { Rollbar.configuration }
26
+ let(:configuration) { Rollbar.configuration }
27
+
28
+ context 'executing a Thread before Rollbar is configured', :skip_dummy_rollbar => true do
29
+ before do
30
+ Rollbar.reset_notifier!
31
+ Rollbar.unconfigure
32
+
33
+ Thread.new {}
34
+
35
+ Rollbar.configure do |config|
36
+ config.access_token = 'my-access-token'
37
+ end
38
+ end
39
+
40
+ it 'sets correct configuration for Rollbar.notifier' do
41
+ expect(Rollbar.notifier.configuration.enabled).to be_truthy
42
+ end
43
+ end
27
44
 
28
45
  it 'should report a simple message' do
29
46
  expect(notifier).to receive(:report).with('error', 'test message', nil, nil)
@@ -283,7 +300,7 @@ describe Rollbar do
283
300
  end
284
301
 
285
302
  it 'should have the correct server keys' do
286
- payload['data'][:server].keys.should match_array([:host, :root])
303
+ payload['data'][:server].keys.should match_array([:host, :root, :pid])
287
304
  end
288
305
 
289
306
  it 'should have the correct level and message body' do
@@ -303,6 +320,8 @@ describe Rollbar do
303
320
  end
304
321
 
305
322
  it 'should overwrite existing keys from payload_options' do
323
+ reconfigure_notifier
324
+
306
325
  payload_options = {
307
326
  :notifier => 'bad notifier',
308
327
  :server => { :host => 'new host', :new_server_key => 'value' }
@@ -565,20 +584,38 @@ describe Rollbar do
565
584
  chain[1][:exception][:message].should match(/the cause/)
566
585
  end
567
586
 
568
- context 'using ruby <= 2.1' do
569
- next if Exception.instance_methods.include?(:cause)
587
+ context 'with cyclic nested exceptions' do
588
+ let(:exception1) { Exception.new('exception1') }
589
+ let(:exception2) { Exception.new('exception2') }
570
590
 
571
- it 'sends only the last exception in the trace attribute' do
572
- body = notifier.send(:build_payload_body_exception, message, rescued_exception, extra)
591
+ before do
592
+ allow(exception1).to receive(:cause).and_return(exception2)
593
+ allow(exception2).to receive(:cause).and_return(exception1)
594
+ end
573
595
 
574
- body[:trace].should be_kind_of(Hash)
575
- body[:trace_chain].should be_nil
596
+ it 'doesnt loop for ever' do
597
+ body = notifier.send(:build_payload_body_exception, message, exception1, extra)
598
+ chain = body[:trace_chain]
576
599
 
577
- body[:trace][:exception][:class].should match(/StandardError/)
578
- body[:trace][:exception][:message].should match(/the error/)
600
+ expect(chain[0][:exception][:message]).to be_eql('exception1')
601
+ expect(chain[1][:exception][:message]).to be_eql('exception2')
579
602
  end
580
603
  end
581
604
  end
605
+
606
+ context 'using ruby <= 2.1' do
607
+ next if Exception.instance_methods.include?(:cause)
608
+
609
+ it 'sends only the last exception in the trace attribute' do
610
+ body = notifier.send(:build_payload_body_exception, message, rescued_exception, extra)
611
+
612
+ body[:trace].should be_kind_of(Hash)
613
+ body[:trace_chain].should be_nil
614
+
615
+ body[:trace][:exception][:class].should match(/StandardError/)
616
+ body[:trace][:exception][:message].should match(/the error/)
617
+ end
618
+ end
582
619
  end
583
620
  end
584
621
 
@@ -909,7 +946,7 @@ describe Rollbar do
909
946
  it 'should report simple messages' do
910
947
  logger_mock.should_receive(:info).with('[Rollbar] Scheduling payload')
911
948
  logger_mock.should_receive(:info).with('[Rollbar] Success')
912
- Rollbar.report_message("Test message")
949
+ Rollbar.error('Test message')
913
950
  end
914
951
 
915
952
  it 'should not report anything when disabled' do
@@ -918,7 +955,7 @@ describe Rollbar do
918
955
  config.enabled = false
919
956
  end
920
957
 
921
- Rollbar.report_message("Test message that should be ignored")
958
+ Rollbar.error('Test message that should be ignored')
922
959
 
923
960
  Rollbar.configure do |config|
924
961
  config.enabled = true
@@ -927,8 +964,8 @@ describe Rollbar do
927
964
 
928
965
  it 'should report messages with extra data' do
929
966
  logger_mock.should_receive(:info).with('[Rollbar] Success')
930
- Rollbar.report_message("Test message with extra data", 'debug', :foo => "bar",
931
- :hash => { :a => 123, :b => "xyz" })
967
+ Rollbar.debug('Test message with extra data', 'debug', :foo => "bar",
968
+ :hash => { :a => 123, :b => "xyz" })
932
969
  end
933
970
 
934
971
  # END Backwards
@@ -1127,7 +1164,7 @@ describe Rollbar do
1127
1164
  it 'sends a payload generated as String, not as a Hash' do
1128
1165
  logger_mock.should_receive(:info).with('[Rollbar] Success')
1129
1166
 
1130
- Rollbar.report_exception(exception)
1167
+ Rollbar.error(exception)
1131
1168
  end
1132
1169
 
1133
1170
  context 'with async failover handlers' do
@@ -1150,7 +1187,7 @@ describe Rollbar do
1150
1187
  it 'doesnt call any failover handler' do
1151
1188
  expect(handler).not_to receive(:call)
1152
1189
 
1153
- Rollbar.report_exception(exception)
1190
+ Rollbar.error(exception)
1154
1191
  end
1155
1192
  end
1156
1193
 
@@ -37,6 +37,12 @@ RSpec.configure do |config|
37
37
  DatabaseCleaner.clean
38
38
  end
39
39
  config.backtrace_exclusion_patterns = [/gems\/rspec-.*/]
40
+
41
+ if ENV['SKIP_DUMMY_ROLLBAR']
42
+ config.filter_run(:skip_dummy_rollbar => true)
43
+ else
44
+ config.filter_run_excluding(:skip_dummy_rollbar => true)
45
+ end
40
46
  end
41
47
 
42
48
  def local?
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: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rollbar, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2014-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json