honeybadger 5.0.2 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +713 -701
  3. data/LICENSE +19 -19
  4. data/README.md +57 -57
  5. data/TROUBLESHOOTING.md +3 -3
  6. data/bin/honeybadger +5 -5
  7. data/lib/honeybadger/agent.rb +488 -488
  8. data/lib/honeybadger/backend/base.rb +116 -116
  9. data/lib/honeybadger/backend/debug.rb +22 -22
  10. data/lib/honeybadger/backend/null.rb +29 -29
  11. data/lib/honeybadger/backend/server.rb +62 -62
  12. data/lib/honeybadger/backend/test.rb +46 -46
  13. data/lib/honeybadger/backend.rb +27 -27
  14. data/lib/honeybadger/backtrace.rb +181 -181
  15. data/lib/honeybadger/breadcrumbs/active_support.rb +119 -119
  16. data/lib/honeybadger/breadcrumbs/breadcrumb.rb +53 -53
  17. data/lib/honeybadger/breadcrumbs/collector.rb +82 -82
  18. data/lib/honeybadger/breadcrumbs/logging.rb +51 -51
  19. data/lib/honeybadger/breadcrumbs/ring_buffer.rb +44 -44
  20. data/lib/honeybadger/breadcrumbs.rb +8 -8
  21. data/lib/honeybadger/cli/deploy.rb +43 -43
  22. data/lib/honeybadger/cli/exec.rb +143 -143
  23. data/lib/honeybadger/cli/helpers.rb +28 -28
  24. data/lib/honeybadger/cli/heroku.rb +129 -129
  25. data/lib/honeybadger/cli/install.rb +101 -101
  26. data/lib/honeybadger/cli/main.rb +237 -237
  27. data/lib/honeybadger/cli/notify.rb +67 -67
  28. data/lib/honeybadger/cli/test.rb +267 -267
  29. data/lib/honeybadger/cli.rb +14 -14
  30. data/lib/honeybadger/config/defaults.rb +336 -333
  31. data/lib/honeybadger/config/env.rb +42 -42
  32. data/lib/honeybadger/config/ruby.rb +146 -146
  33. data/lib/honeybadger/config/yaml.rb +76 -76
  34. data/lib/honeybadger/config.rb +413 -413
  35. data/lib/honeybadger/const.rb +20 -20
  36. data/lib/honeybadger/context_manager.rb +55 -55
  37. data/lib/honeybadger/conversions.rb +16 -16
  38. data/lib/honeybadger/init/rails.rb +38 -38
  39. data/lib/honeybadger/init/rake.rb +66 -66
  40. data/lib/honeybadger/init/ruby.rb +11 -11
  41. data/lib/honeybadger/init/sinatra.rb +51 -51
  42. data/lib/honeybadger/logging.rb +177 -177
  43. data/lib/honeybadger/notice.rb +579 -568
  44. data/lib/honeybadger/plugin.rb +210 -210
  45. data/lib/honeybadger/plugins/breadcrumbs.rb +111 -111
  46. data/lib/honeybadger/plugins/delayed_job/plugin.rb +56 -56
  47. data/lib/honeybadger/plugins/delayed_job.rb +22 -22
  48. data/lib/honeybadger/plugins/faktory.rb +52 -52
  49. data/lib/honeybadger/plugins/lambda.rb +71 -71
  50. data/lib/honeybadger/plugins/local_variables.rb +44 -44
  51. data/lib/honeybadger/plugins/passenger.rb +23 -23
  52. data/lib/honeybadger/plugins/rails.rb +72 -63
  53. data/lib/honeybadger/plugins/resque.rb +72 -72
  54. data/lib/honeybadger/plugins/shoryuken.rb +52 -52
  55. data/lib/honeybadger/plugins/sidekiq.rb +71 -62
  56. data/lib/honeybadger/plugins/sucker_punch.rb +18 -18
  57. data/lib/honeybadger/plugins/thor.rb +32 -32
  58. data/lib/honeybadger/plugins/warden.rb +19 -19
  59. data/lib/honeybadger/rack/error_notifier.rb +92 -92
  60. data/lib/honeybadger/rack/user_feedback.rb +88 -88
  61. data/lib/honeybadger/rack/user_informer.rb +45 -45
  62. data/lib/honeybadger/ruby.rb +2 -2
  63. data/lib/honeybadger/singleton.rb +103 -103
  64. data/lib/honeybadger/tasks.rb +22 -22
  65. data/lib/honeybadger/templates/feedback_form.erb +84 -84
  66. data/lib/honeybadger/util/http.rb +92 -92
  67. data/lib/honeybadger/util/lambda.rb +32 -32
  68. data/lib/honeybadger/util/request_hash.rb +73 -73
  69. data/lib/honeybadger/util/request_payload.rb +41 -41
  70. data/lib/honeybadger/util/revision.rb +39 -39
  71. data/lib/honeybadger/util/sanitizer.rb +214 -214
  72. data/lib/honeybadger/util/sql.rb +34 -34
  73. data/lib/honeybadger/util/stats.rb +50 -50
  74. data/lib/honeybadger/version.rb +4 -4
  75. data/lib/honeybadger/worker.rb +253 -253
  76. data/lib/honeybadger.rb +11 -11
  77. data/resources/ca-bundle.crt +3376 -3376
  78. data/vendor/capistrano-honeybadger/lib/capistrano/honeybadger.rb +5 -5
  79. data/vendor/capistrano-honeybadger/lib/capistrano/tasks/deploy.cap +89 -89
  80. data/vendor/capistrano-honeybadger/lib/honeybadger/capistrano/legacy.rb +47 -47
  81. data/vendor/capistrano-honeybadger/lib/honeybadger/capistrano.rb +2 -2
  82. data/vendor/cli/inifile.rb +628 -628
  83. data/vendor/cli/thor/actions/create_file.rb +103 -103
  84. data/vendor/cli/thor/actions/create_link.rb +59 -59
  85. data/vendor/cli/thor/actions/directory.rb +118 -118
  86. data/vendor/cli/thor/actions/empty_directory.rb +135 -135
  87. data/vendor/cli/thor/actions/file_manipulation.rb +316 -316
  88. data/vendor/cli/thor/actions/inject_into_file.rb +107 -107
  89. data/vendor/cli/thor/actions.rb +319 -319
  90. data/vendor/cli/thor/base.rb +656 -656
  91. data/vendor/cli/thor/command.rb +133 -133
  92. data/vendor/cli/thor/core_ext/hash_with_indifferent_access.rb +77 -77
  93. data/vendor/cli/thor/core_ext/io_binary_read.rb +10 -10
  94. data/vendor/cli/thor/core_ext/ordered_hash.rb +98 -98
  95. data/vendor/cli/thor/error.rb +32 -32
  96. data/vendor/cli/thor/group.rb +281 -281
  97. data/vendor/cli/thor/invocation.rb +178 -178
  98. data/vendor/cli/thor/line_editor/basic.rb +35 -35
  99. data/vendor/cli/thor/line_editor/readline.rb +88 -88
  100. data/vendor/cli/thor/line_editor.rb +17 -17
  101. data/vendor/cli/thor/parser/argument.rb +73 -73
  102. data/vendor/cli/thor/parser/arguments.rb +175 -175
  103. data/vendor/cli/thor/parser/option.rb +125 -125
  104. data/vendor/cli/thor/parser/options.rb +218 -218
  105. data/vendor/cli/thor/parser.rb +4 -4
  106. data/vendor/cli/thor/rake_compat.rb +71 -71
  107. data/vendor/cli/thor/runner.rb +322 -322
  108. data/vendor/cli/thor/shell/basic.rb +421 -421
  109. data/vendor/cli/thor/shell/color.rb +149 -149
  110. data/vendor/cli/thor/shell/html.rb +126 -126
  111. data/vendor/cli/thor/shell.rb +81 -81
  112. data/vendor/cli/thor/util.rb +267 -267
  113. data/vendor/cli/thor/version.rb +3 -3
  114. data/vendor/cli/thor.rb +484 -484
  115. metadata +10 -5
data/CHANGELOG.md CHANGED
@@ -1,701 +1,713 @@
1
- # Change Log
2
- All notable changes to this project will be documented in this file. See [Keep a
3
- CHANGELOG](http://keepachangelog.com/) for how to update this file. This project
4
- adheres to [Semantic Versioning](http://semver.org/).
5
-
6
- ## [Unreleased]
7
-
8
- ## [5.0.2] - 2022-11-04
9
- ### Fixed
10
- - `Honeybadger.check_in` would raise an exception when used with the test backend (#449)
11
-
12
- ## [5.0.1] - 2022-10-27
13
- ### Fixed
14
- - Ignore `Sidekiq::JobRetry` skip exception. Since support was added for Rails 7
15
- error reporting interface these exceptions are being reported in addition to
16
- the exception that caused the job to be retried. Mike Perham says these
17
- exceptions can safely be ignored.
18
- See https://github.com/rails/rails/pull/43625#issuecomment-1071574110
19
-
20
- ## [5.0.0] - 2022-10-18
21
- ### Changed
22
- - `Honeybadger.notify` is now idempotent; it will skip reporting exception
23
- objects that have already been reported before, and simply return the existing
24
- notice ID.
25
- - Honeybadger is now initialized before Rails' initializers, allowing you to
26
- report errors raised during startup. Config added via `Honeybadger.configure`
27
- is added later in the Rails initialization process.
28
-
29
- ### Added
30
- - Support Rails 7 error reporting interface (#443)
31
-
32
- ### Fixed
33
- - Replace deployhook with release webhook (#444)
34
- See https://blog.heroku.com/deployhooks-sunset
35
-
36
- ## [4.12.2] - 2022-08-15
37
- ### Fixed
38
- - Fix a bug where the auto-detected revision is blank instead of nil
39
- - Fix inadvertent creation of invalid sessions (#441)
40
-
41
- ## [4.12.1] - 2022-04-01
42
- ### Fixed
43
- - Fix Lambda plugin: support Ruby <2.5 (#428)
44
-
45
- ## [4.12.0] - 2022-03-30
46
- ### Added
47
- - Added `hb_wrap_handler` to automatically capture AWS Lambda handler errors
48
-
49
- ### Fixed
50
- - Change `:exception_message` key name to just `:exception` for error breadcrumb metadata.
51
-
52
- ## [4.11.0] - 2022-02-15
53
- ### Fixed
54
- - Allow special characters in tags. Also support space-delimited tags:
55
- "one two three" and "one, two, three" are equivalent
56
-
57
- ## [4.10.0] - 2022-01-19
58
- ### Added
59
- - Add more items to the default config file
60
-
61
- ### Fixed
62
- - Fix a Ruby 3.1 bug that breaks regexp classes in honeybadger.yml (#418)
63
-
64
- ## [4.9.0] - 2021-06-28
65
- ### Fixed
66
- - Replaced fixed number for retries in Sidekiq Plugin with Sidekiq::JobRetry constant
67
- - Properly set environment in deployment tracking (#404, @stmllr)
68
-
69
- ### Added
70
- - Added 'ActionDispatch::Http::MimeNegotiation::InvalidType' (Rails 6.1) to
71
- default ignore list. (#402, @jrochkind)
72
-
73
- ## [4.8.0] - 2021-03-16
74
- ### Fixed
75
- - Suppress any error output from the `git rev-parse` command. ([#394](https://github.com/honeybadger-io/honeybadger-ruby/pull/394))
76
-
77
- ### Added
78
- - Support deployment tracking in code (#397, @danleyden)
79
-
80
- ## [4.7.3] - 2021-02-10
81
- ### Fixed
82
- - Don't enable Lambda plugin in non-Lambda execution environments
83
-
84
- ## [4.7.2] - 2020-08-17
85
- ### Fixed
86
- - Remove usage of `ActiveRecord::Base.connection` (thanks @jcoyne for testing)
87
- - Check for UTF-8 in ActiveRecord breadcrumb exclusion filter
88
-
89
- ## [4.7.1] - 2020-08-11
90
- ### Fixed
91
- - ActiveRecord SQL Breadcrumb event pulls adapter from supplied connection,
92
- allowing for multiple databases.
93
- - Fix Rails deprecation of `ActionDispatch::ParamsParser::ParseError`
94
- - Deal with invalid UTF-8 byte sequences during SQL obfuscation
95
- - Fix Ruby 2.7 deprecation notice in sql.rb
96
-
97
- ## [4.7.0] - 2020-06-02
98
- ### Fixed
99
- - Alias `Notice#controller=` as `Notice#component=`
100
- - Fix Rails 6.1 deprecation warning with `ActiveRecord::Base.connection_config`
101
- - Fix agent where breadcrumbs.enabled = true and local_context = true
102
-
103
- ### Added
104
- - Add `honeybadger_skip_rails_load` Capistrano option to skip rails load on
105
- deployment notification (#355) -@NielsKSchjoedt
106
-
107
- ## [4.6.0] - 2020-03-12
108
- ### Fixed
109
- - Fixed issue where Sidekiq.attempt_threshold was triggering 2 attempts ahead
110
- of the setting
111
- - Dupe notify opts before mutating (#345)
112
-
113
- ### Changed
114
- - Breadcrumbs on by default
115
- - Added Faktory plugin -@scottrobertson
116
-
117
- ## [4.5.6] - 2020-01-08
118
- ### Fixed
119
- - Fix remaining Ruby 2.7 deprecation warnings
120
-
121
- ## [4.5.5] - 2020-01-06
122
- ### Fixed
123
- - Replace empty `Proc.new` with explicit block param to suppress warnings
124
- in Ruby 2.7
125
-
126
- ## [4.5.4] - 2019-12-09
127
- ### Fixed
128
- - Re-released to remove vendor cruft
129
-
130
- ## [4.5.3] - 2019-12-09
131
- ### Fixed
132
- - Include Context in Notices for failed Resque jobs
133
-
134
- ## [4.5.2] - 2019-10-09
135
- ### Changed
136
- - Added parameter filtering to breadcrumb metadata (#329)
137
-
138
- ### Added
139
- - Added `lambda` plugin which forces sync mode (to make sure that we are not
140
- sending notices in another thread) and adds extra lambda details to the
141
- Notice. (honeybadger-ruby-internal#1)
142
-
143
- ## [4.5.1] - 2019-08-13
144
- ### Fixed
145
- - Logging breadcrumbs will not crash anymore when logging is done using a block
146
- form. -@Bajena
147
- - When `breadcrumbs` are enabled ensure we call the original `Logger#add` with
148
- the original arguments -@JanStevens
149
-
150
- ## [4.5.0] - 2019-08-05
151
- ### Changed
152
- - Default `max_queue_size` has been reduced from 1000 to 100.
153
-
154
- ### Added
155
- - Added `Notice#causes`, which allows cause data to be mutated in
156
- `before_notify` callbacks (useful for filtering purposes).
157
- - Added `Notice#cause=`, which allows the cause to be changed or disabled
158
- in `before_notify` callbacks.
159
- - Added extra shutdown logging.
160
-
161
- ### Fixed
162
- - `Honeybadger.notify(exception, cause: nil)` will now prevent the cause from
163
- being reported.
164
- - When throttled, queued notices will be discarded during shutdown.
165
-
166
- ## [4.4.2] - 2019-08-01
167
- ### Fixed
168
- - Handle ActiveSupport::Notifications passing nil started or finished time
169
- -@pcreux
170
-
171
- ## [4.4.1] - 2019-07-30
172
- ### Fixed
173
- - Allow non-strings to be passed to breadcrumbs logger
174
-
175
- ## [4.4.0] - 2019-07-24
176
- ### Added
177
- - Added the ability to store and send Breadcrumbs along with the notice.
178
- Breadcrumbs are disabled by default in this version so they must be enabled
179
- via the config (option `breadcrumbs.enabled`) to work.
180
-
181
- ## [4.3.1] - 2019-05-30
182
- ### Fixed
183
- - Add Rails 6 RC1 Support
184
-
185
- ## [4.3.0] - 2019-05-17
186
- ### Added
187
- - Send a value for action when reporting a component for Sidekiq jobs -@stympy
188
-
189
- ## [4.2.2] - 2019-04-25
190
- ### Fixed
191
- - Fix a bug where some non-standard backtraces could not be parsed, resulting in
192
- an error when sending error reports. Backtraces are now explicitly converted
193
- to arrays, and lines are converted to strings.
194
- - Fix a typo in throttle log message. -@mobilutz
195
-
196
- ## [4.2.1] - 2019-02-01
197
- ### Fixed
198
- - Fix #301 - before_notify hooks are overridden on subsequent
199
- `Honeybadger.configure` calls.
200
- - Revert "Get the right controller / action name in Rails, when using an
201
- exception app for custom error pages."
202
-
203
- ## [4.2.0] - 2019-01-31
204
- ### Changed
205
- - Issue a Notification from a Sidekiq job when either the `sidekiq.attempt_threshold` is reached OR if the job defined retry threshold is reached, whichever comes first. -@mstruve
206
- - Updated supported Ruby/Rails versions (MRI >= 2.3.0, JRuby >= 9.2, Rails >= 4.2)
207
- https://docs.honeybadger.io/ruby/gem-reference/supported-versions.html
208
-
209
- ### Added
210
- - Get the right controller / action name in Rails, when using an exception app for custom error pages. -@fernandes
211
-
212
- ## [4.1.0] - 2018-10-16
213
- ### Added
214
- - Added flag `--skip-rails-load` to cli commands for optionally skipping Rails initialization when running from a Rails root.
215
-
216
- ### Fixed
217
- - Added missing Backend::Server#check_in specs
218
- - Fix a memory leak in the worker queue (jruby)
219
-
220
- ## [4.0.0] - 2018-08-21
221
- ### Added
222
- - Added `before_notify` hooks to be defined, this allows setting up of multiple
223
- hooks which will be invoked with a `notice` before a `notice` is sent. Each
224
- `before_notify` hook MUST be a `callable` (lambda, Proc etc,) with an arity of 1.
225
- - Added the ability to halt notices in callbacks using `notice.halt!`
226
- - Make essential attributes on Notice writable:
227
- ```ruby
228
- Honeybadger.configure do |config|
229
- config.before_notify do |notice|
230
- notice.api_key = 'custom api key',
231
- notice.error_message = "badgers!",
232
- notice.error_class = 'MyError',
233
- notice.backtrace = ["/path/to/file.rb:5 in `method'"],
234
- notice.fingerprint = 'some unique string',
235
- notice.tags = ['foo', 'bar'],
236
- notice.context = { user: 33 },
237
- notice.controller = 'MyController',
238
- notice.action = 'index',
239
- notice.parameters = { q: 'badgers?' },
240
- notice.session = { uid: 42 },
241
- notice.url = "/badgers",
242
- end
243
- end
244
- ```
245
-
246
- ### Fixed
247
- - Ignore SIGTERM SignalExceptions.
248
-
249
- ### Removed
250
- - Removed Notice#[]
251
-
252
- ### Changed
253
- - The public method `Notice#backtrace` is now exposed as the raw Ruby
254
- backtrace instead of an instance of `Honeybadger::Backtrace` (a private
255
- class).
256
-
257
- Before:
258
- ```ruby
259
- notice.backtrace # => #<Honeybadger::Backtrace>
260
- ```
261
-
262
- After:
263
- ```ruby
264
- notice.backtrace # => ["/path/to/file.rb:5 in `method'"]
265
- ```
266
- - `notice[:context]` now defaults to an empty Hash instead of nil.
267
-
268
- Before:
269
- ```ruby
270
- notice[:context] # => nil
271
- ```
272
-
273
- After:
274
- ```ruby
275
- notice[:context] # => {}
276
- ```
277
- - The public method `Notice#fingerprint` now returns the original
278
- String which was passed in from the `:fingerprint` option or the
279
- `exception_fingerprint` callback, not a SHA1 hashed value. The value is
280
- still hashed before sending through to the API.
281
- - The public method `Honeybadger.exception_filter` has been deprecated in favor
282
- of `before_notify`:
283
- ```ruby
284
- Honeybadger.configure do |config|
285
- config.before_notify do |notice|
286
- notice.halt!
287
- end
288
- end
289
- ```
290
- - The public method `Honeybadger.exception_fingerprint` has been deprecated in favor
291
- of `before_notify`:
292
- ```ruby
293
- Honeybadger.configure do |config|
294
- config.before_notify do |notice|
295
- notice.fingerprint = 'new fingerprint'
296
- end
297
- end
298
- ```
299
- - The public method `Honeybadger.backtrace_filter` has been deprecated in favor
300
- of `before_notify`:
301
- ```ruby
302
- Honeybadger.configure do |config|
303
- config.before_notify do |notice|
304
- notice.backtrace.reject!{|x| x =~ /gem/}
305
- end
306
- end
307
- ```
308
-
309
- ### Removed
310
- - The `disabled` option is now removed, Use the `report_data` option instead.
311
-
312
- ## [3.3.1] - 2018-08-02
313
- ### Fixed
314
- - Fix synchronous throttling in shoryuken
315
-
316
- ## [3.3.0] - 2018-01-29
317
- ### Changed
318
- - Use prepend to add Sidekiq Middleware to fix context getting cleared.
319
- - Add `Rack::QueryParser::ParameterTypeError` and
320
- `Rack::QueryParser::InvalidParameterError` to default ignore list.
321
-
322
- ### Fixed
323
- - Use a unique route name in rails to avoid name conflicts.
324
- - Fix `at_exit` callback being skipped in rails apps with a sinatra dependency.
325
-
326
- ## [3.2.0] - 2017-11-27
327
- ### Changed
328
- - Objects which explicitly alias `#to_s` to `#inspect` (such as `OpenStruct`) are
329
- now sanitized. `'#<OpenStruct attribute="value">'` becomes `'#<OpenStruct>'`.
330
- If you pass the value of `#inspect` (as a `String`) directly to Honeybadger (or
331
- return it from `#to_honeybadger`), the value will not be sanitized.
332
- - We're now using `String(object)` instead of `object.to_s` as the last resort
333
- during sanitization.
334
-
335
- ### Added
336
- - The exception cause may now be set using an optional `:cause` option when
337
- calling `Honeybadger.notify`. If not present, the exception's cause will be
338
- used, or the global `$!` exception if available.
339
- - Any object can now act as context using the `#to_honeybadger_context` method.
340
- The method should have no arguments and return a `Hash` of context data.
341
- Context from exceptions which define this method will automatically be
342
- included in error reports.
343
- - Final object representations in Honeybadger (normally the value of `#to_s`
344
- for unknown types) can be changed by defining the `#to_honeybadger` method. If
345
- the method is defined, the return value of that method will be sent to Honeybadger
346
- instead of the `#to_s` value (for context values, local variables, etc.).
347
- - `'[RAISED]'` is returned when `object.to_honeybadger` or `String(object)` fails.
348
- - Added `Honeybadger.check_in` method which allows performing check ins from ruby.
349
-
350
- ### Fixed
351
- - We no longer use "/dev/null" as the default log device as it doesn't exist on
352
- Windows.
353
- - Logs when reporting errors in development mode now mention that the error wasn't
354
- *actually* reported. :)
355
- - Support new Sidekiq job params key.
356
- - Move at_exit callback to an appropriate place for sinatra apps, so that it does
357
- not prematurely stop honeybadger workers.
358
- - `BasicObject`, which previously could not be serialized, is now serialized as
359
- `"#<BasicObject>"`.
360
-
361
- ## [3.1.2] - 2017-04-20
362
- ### Fixed
363
- - Fixed a bug in the Resque plugin which prevented error reports from being
364
- sent. The issue was that the Resque's callbacks were executed in an unexpected
365
- order which caused the queue to be flushed before error notification instead
366
- of after.
367
-
368
- ## [3.1.1] - 2017-04-13
369
- ### Fixed
370
- - `honeybadger deploy` cli command now reads default environment from
371
- honeybadger.yml/environment variable.
372
- - Fixed a conflict with the web-console gem.
373
-
374
- ## [3.1.0] - 2017-03-01
375
- ### Changed
376
- - Exceptions encountered while loading/evaluating honeybadger.yml are now raised
377
- instead of logged.
378
-
379
- ### Added
380
- - Friendlier backtraces for exceptions originating in honeybadger.yml.
381
- - Notify errors in Shoryuken batches -@phstc
382
-
383
- ### Fixed
384
- - Rails environment is now loaded when running `honeybadger` cli from a Rails
385
- root. This fixes an issue where programmatic configuration from Rails was not
386
- loaded.
387
- - Fixed logger isn't being overridden properly when configuring with
388
- Honeybadger.configure -@anujbiyani
389
-
390
- ## [3.0.2] - 2017-02-16
391
- ### Fixed
392
- - Fixed a bug caused by an interaction with the semantic\_logger gem.
393
-
394
- ## [3.0.1] - 2017-02-10
395
- ### Fixed
396
- - Fixed a bug which caused a NoMethodError (undefined method \`start_with?') when
397
- Rack env contained non-string keys.
398
-
399
- ## [3.0.0] - 2017-02-06
400
- ### Added
401
- - You may now require 'honeybadger/ruby' instead of 'honeybadger' to get the
402
- agent without the integrations (no railtie, plugins or monkey patching).
403
- - You can now create multiple instances of the Honeybadger agent with different
404
- configurations (many classes in the library can be composed).
405
- - `Honeybadger.configure` works again -- use it to configure the library from
406
- Ruby! (we still default to honeybadger.yml in our installer)
407
- - Our test suite is now leaner and meaner (which means we can add new features
408
- faster). Reduced typical build times from up to 2 minutes to 20 seconds.
409
- - We've rebuilt the CLI from scratch. The new CLI features super verbose error
410
- messages with (hopefully) helpful suggestions, some new commands, and better
411
- framework detection in the `install` and `test` commands.
412
- - Use `honeybadger exec your_command` from the command line to report the error
413
- when the command fails due to a non-zero exit status or standard error output.
414
- (Use it to report failures in cron!) See `honeybadger help exec`.
415
- - Use `honeybadger notify` from the command line to report custom errors to
416
- Honeybadger. See `honeybadger help notify`.
417
- - ~/honeybadger.yml is now a default config path for the CLI and standalone-ruby
418
- installations.
419
- - `Honeybadger.notify` now converts arguments which are not `Exception` or
420
- `Hash` types to strings and assigns them as the error message. Example:
421
- `Honeybadger.notify("Something went wrong")`.
422
- - The currently deployed git revision is now detected automatically and sent
423
- with error reports.
424
-
425
- ### Changed
426
- - `Honeybadger.start` has been deprecated and has no effect.
427
- - We've changed some of the underlying code of the library. If you depend on
428
- internal APIs (such as thread local variable names or any functions not marked
429
- public in the code comments) then you may need to update your code. If you are
430
- developing 3rd-party integrations with our gem [let us
431
- know](https://github.com/honeybadger-io/honeybadger-ruby/issues) so that we can
432
- work with you to build the public APIs you need.
433
- - All Rack middleware no longer require an argument (which used to be a
434
- `Honeybadger::Config` instance) when using them. They now default to the
435
- global agent and accept an optional argument which expects an alternate
436
- `Honeybadger::Agent` instance.
437
- - The *plugins.skip* config option has been renamed to *skipped_plugins*.
438
- - The *sidekiq.use_component* config option is now `true` by default. To get the
439
- old behavior, set it to `false`. When enabled, the Sidekiq plugin will
440
- automatically set the component to the class of the job, which helps with
441
- grouping.
442
- - The `request.filter_keys` option now includes partial matches: with the filter
443
- value "password", keys such as "password" and "otherpassword" will be
444
- filtered.
445
- - CGI variables are now whitelisted when sending the Rack environment to
446
- Honeybadger to prevent sensitive data leakage.
447
- - `Honeybadger.notify` now raises an exception in development mode when called
448
- without the required arguments. It logs outside of development and continues
449
- to send a generic error report.
450
-
451
- ### Removed
452
- - Ruby 1.9.3 and 2.0.x are no longer supported.
453
- - `Honeybadger.notify_or_ignore` has been removed. Use `Honeybadger.notify(e)`
454
- and `Honeybadger.notify(e, force: true)` (to skip ignore filters).
455
- - The CLI command `honeybadger config` has been removed.
456
- - All deprecated Rails controller methods (from version 1.x) have been removed.
457
- - The deprecated `Honeybadger::Rack::MetricsReporter` middleware has been
458
- removed.
459
-
460
- ### Fixed
461
- - Arrays are no longer compacted during sanitization (`nil` values will be sent
462
- as they originally appeared).
463
- - Resque plugin now reports `Resque::DirtyExit` exceptions.
464
-
465
- ## [2.7.2] - 2016-12-12
466
- ### Fixed
467
- - Pass whole exception to `notify_or_ignore` (includes causes). -@CGamesPlay
468
-
469
- ## [2.7.1] - 2016-11-16
470
- ### Fixed
471
- - Fix a Sinatra bug where `RACK_ENV` default was not used as default env.
472
- - Fixed an error when accessing notice request data from `exception_fingerprint`
473
- callback.
474
-
475
- ## [2.7.0] - 2016-10-20
476
- ### Added
477
- - Support Sinatra 2.0.
478
- - Source snippets are now sent for every line of the backtrace.
479
-
480
- ### Changed
481
- - Sunset performance metrics. See
482
- http://blog.honeybadger.io/sunsetting-performance-metrics/
483
- - Backtraces are now limited to a maximum of 1000 lines.
484
-
485
- ## [2.6.1] - 2016-08-24
486
- ### Added
487
- - shoryuken plugin. -@ivanvc
488
-
489
- ### Fixed
490
- - Handle `Errno::ENETUNREACH` error when contacting server. -@tank-bohr
491
- - Remove `ActionDispatch::Http::Headers` from trace payload (fixes `IOError`
492
- when JSON encoding traces in Rails 5).
493
- - Fix "`invoke("git:set_current_revision")` already invoked" warning in
494
- Capistrano 3.6.
495
-
496
- ## [2.6.0] - 2016-04-22
497
- ### Added
498
- - Automatically report unhandled exceptions at exit.
499
- - Add `Honeybadger.get_context` method. -@homanchou
500
-
501
- ### Changed
502
- - Filter Authorization header (HTTP\_AUTHORIZATION) by default.
503
-
504
- ### Fixed
505
- - Always convert to string when sanitizing strings.
506
- - Fix potential performance issue due to and `ensure` block. See #186.
507
-
508
- ## [2.5.3] - 2016-03-10
509
- ### Fixed
510
- - Squashed a bug where the wrong source extract was sent for some instances of
511
- `ActionView::Template::Error`.
512
-
513
- ## [2.5.2] - 2016-03-08
514
- ### Fixed
515
- - Allow plugin names in config to be symbols or strings (#177).
516
- - Fix bug in resque-retry logic. -@davidguthu
517
-
518
- ## [2.5.1] - 2016-02-22
519
- ### Fixed
520
- - Fix bug in resque-retry logic. -@davidguthu
521
-
522
- ## [2.5.0] - 2016-02-19
523
- ### Added
524
- - Configuration option max\_queue_size for maximum worker queue size.
525
- - Add `resque.resque_retry.send_exceptions_when_retrying` config option.
526
- -@davidguthu
527
-
528
- ## [2.4.1] - 2016-02-04
529
- ### Fixed
530
- - Never send traces or metrics when disabled by plan or config.
531
-
532
- ## [2.4.0] - 2016-02-02
533
- ### Added
534
- - [Sucker Punch](https://github.com/brandonhilkert/sucker_punch) support
535
-
536
- ## [2.3.3] - 2016-01-06
537
- ### Fixed
538
- - Fixed a bug which caused a Passenger-related error message when booting a
539
- heroku console.
540
-
541
- ## [2.3.2] - 2015-12-15
542
- ### Fixed
543
- - Be stricter when sanitizing recursive objects (allow only `Hash`, `Array`,
544
- `Set`). This fixes a bug where some gems (such as the dropbox gem)
545
- monkeypatch `#to_hash` on `Array`.
546
-
547
- ## [2.3.1] - 2015-11-20
548
- ### Fixed
549
- - Handle invalid utf8 in ActiveRecord SQL queries.
550
-
551
- ## [2.3.0] - 2015-11-12
552
- ### Added
553
- - Rails 5 support.
554
- - Support overriding TTY behavior in rake reporter.
555
-
556
- ### Fixed
557
- - Capistrano 3 `undefined method `verbosity'` bugfix.
558
- - Fixed "uninitialized constant Set" error when Set is not previously required.
559
-
560
- ## [2.2.0] - 2015-10-29
561
- ### Added
562
- - Added a config option to automatically set the component to the class name of the
563
- Sidekiq job where an error originated. Causes errors to be grouped by worker
564
- in addition to class name/location.
565
-
566
- ### Fixed
567
- - Always refresh capistrano revision during deploy notification.
568
- - Support capistrano-chruby. -Kyle Rippey
569
- - Send the wrapped class name for Sidekiq traces when using a wrapper such as
570
- ActiveJob.
571
- - Performance tuning for Sidekiq plugin.
572
-
573
- ## [2.1.5] - 2015-09-23
574
- ### Fixed
575
- - Apply parameter filters to local variables.
576
-
577
- ## [2.1.4] - 2015-09-02
578
- ### Fixed
579
- - Support windows paths when loading plugins. -@aharpervc
580
-
581
- ## [2.1.3] - 2015-07-24
582
- ### Added
583
- - Don't send empty local_variables in payload when disabled.
584
- - Better logging of reason when API requests are denied.
585
- - Truncate long queries in traces rather than tossing them.
586
-
587
- ### Fixed
588
- - Missing vendor libs.
589
-
590
- ## [2.1.2][yanked]
591
-
592
- ## [2.1.1] - 2015-07-15
593
- ### Added
594
- - Update heroku cli deprecations. -@adamkuipers
595
- - Don't insert middleware if they're disabled. -Bradley Priest
596
- - Don't send RAW_POST_DATA.
597
- - Filter HTTP_COOKIE in request cgi_data. -Sam McTaggart
598
- - Support for extracting the correct component & action for Rails Active Jobs
599
- (previously all Active Jobs where reported as
600
- 'ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper'). -Panos Korros
601
-
602
- ### Fixed
603
- - Fix breakage relating to Exceptions containing a :cause attribute which is not
604
- itself an Exception. -Gabe da Silveira
605
-
606
- ## [2.1.0] - 2015-06-04
607
- ### Added
608
- - Add events to instrumented traces (i.e. in background jobs).
609
- - Restart workers once per hour when shutdown due to 40x.
610
- - Send request data with traces.
611
- - Support Resque natively.
612
- - Configure sidekiq.attempt_threshold to suppress notifications until retry
613
- threshold is reached.
614
- - Add exceptions.unwrap to config.
615
-
616
- ### Changed
617
- - Trim all sanitized strings to 2k.
618
- - Ditch per-controller metrics and add render_partial event to traces. -Benjamin Curtis
619
- - Exit with 1 from deploy command when request fails but ignore the failures in
620
- the capistrano task.
621
- - Update default ignored exceptions to include the latest Rails rescue
622
- responses. (see issue #107)
623
- - Exceptions with the same type but caused within different delayed jobs are not
624
- grouped together. They have their component and action set so that the
625
- application class name and excecuted action is displayed in the UI. -Panos
626
- Korros
627
- - All events logged within a delayed_job even those logged by Honeybadger.notify
628
- inherit the context of the delayed job and include the job_id, attempts,
629
- last_error and queue. -Panos Korros
630
-
631
- ### Fixed
632
- - Allow API key to be overridden from `Honeybadger.notify`.
633
- - Fix a tracing issue with net/http requests.
634
- - Disable local variables when BetterErrors is detected.
635
- - Prevent Sinatra from using the same middleware more than once and add
636
- sinatra.enabled setting (default true) to disable auto-initialization
637
- of Sinatra.
638
- - Catch Errno::ENFILE when reading system stats. -Dmitry Polushkin
639
- - Use explicit types for config options when casting from ENV.
640
-
641
- ## [2.0.12] - 2015-04-27
642
- ### Fixed
643
- - Fix bug when processing source extract for action_view templates.
644
-
645
- ## [2.0.11] - 2015-04-02
646
- ### Fixed
647
- - Don't access secrets before Rails initialization.
648
- - Fix a bug which introduced a hard-dependency on Rack.
649
-
650
- ## [2.0.10] - 2015-03-24
651
- ### Added
652
- - Add support for honeybadger_user with Capistrano 2. -Nathan Fixler
653
-
654
- ### Fixed
655
- - Fix a bug in ping where JSON was double-quoted.
656
-
657
- ## [2.0.9] - 2015-03-15
658
- ### Fixed
659
- - Fixed a bug introduced in v2.0.8 which applied params filters to backtrace.
660
- - Fail gracefully when honeybadger.yml is empty or invalid.
661
-
662
- ## [2.0.8] - 2015-03-11
663
- ### Added
664
- - Include full backtrace when logging worker exceptions.
665
- - Always send a test notice on install.
666
- - Send the id of the current process with error reports.
667
-
668
- ### Fixed
669
- - Handle bad encodings in exception payloads.
670
-
671
- ## [2.0.7][yanked] - 2015-03-11
672
-
673
- ## [2.0.6] - 2015-02-16
674
- ### Fixed
675
- - Don't sub partial project root in backtrace lines.
676
-
677
- ## [2.0.5] - 2015-02-12
678
- ### Added
679
- - Merge exceptions.ignore config values with default ignored exception class
680
- names and add exceptions.ignore_only option to override.
681
-
682
- ## [2.0.4] - 2015-02-10
683
- ### Added
684
- - Support for capistrano-rbenv gem in Capistrano task. -Chris Gunther
685
-
686
- ## [2.0.3] - 2015-02-10
687
- ### Fixed
688
- - Support for capistrano-rvm gem in Capistrano task. -Kyle Rippey
689
- - Don't require honeybadger.yml to be writable when reading.
690
-
691
- ## [2.0.2] - 2015-02-04
692
- ### Fixed
693
- - Detect ActionDispatch::TestProcess being included globally, fix issue locally,
694
- warn the user.
695
- - Fix a nil logger bug when a config error occurs.
696
-
697
- ## [2.0.1] - 2015-01-30
698
- ### Fixed
699
- - Don't instrument metrics and traces in Rails when features are not available
700
- on account.
701
- - Don't send error reports when disabled via configuration.
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file. See [Keep a
3
+ CHANGELOG](http://keepachangelog.com/) for how to update this file. This project
4
+ adheres to [Semantic Versioning](http://semver.org/).
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [5.1.0] - 2023-01-31
9
+ ### Added
10
+ - Support for `Exception#detailed_message` on Ruby 3.2 (#459)
11
+ - Added `notice.parsed_backtrace` method, meant to make custom fingerprints easier (#454)
12
+ - Support for Sidekiq 7 (#458)
13
+
14
+ ### Changed
15
+ - On Rails 7, The Honeybadger gem now prioritises the more detailed integrations' native error handlers instead of `Rails.error`, to avoid loss of context (#460)
16
+
17
+ ### Fixed
18
+ - Stopped the Rails middleware from crashing due to changes on Rails 7.1 (#464)
19
+
20
+ ## [5.0.2] - 2022-11-04
21
+ ### Fixed
22
+ - `Honeybadger.check_in` would raise an exception when used with the test backend (#449)
23
+
24
+ ## [5.0.1] - 2022-10-27
25
+ ### Fixed
26
+ - Ignore `Sidekiq::JobRetry` skip exception. Since support was added for Rails 7
27
+ error reporting interface these exceptions are being reported in addition to
28
+ the exception that caused the job to be retried. Mike Perham says these
29
+ exceptions can safely be ignored.
30
+ See https://github.com/rails/rails/pull/43625#issuecomment-1071574110
31
+
32
+ ## [5.0.0] - 2022-10-18
33
+ ### Changed
34
+ - `Honeybadger.notify` is now idempotent; it will skip reporting exception
35
+ objects that have already been reported before, and simply return the existing
36
+ notice ID.
37
+ - Honeybadger is now initialized before Rails' initializers, allowing you to
38
+ report errors raised during startup. Config added via `Honeybadger.configure`
39
+ is added later in the Rails initialization process.
40
+
41
+ ### Added
42
+ - Support Rails 7 error reporting interface (#443)
43
+
44
+ ### Fixed
45
+ - Replace deployhook with release webhook (#444)
46
+ See https://blog.heroku.com/deployhooks-sunset
47
+
48
+ ## [4.12.2] - 2022-08-15
49
+ ### Fixed
50
+ - Fix a bug where the auto-detected revision is blank instead of nil
51
+ - Fix inadvertent creation of invalid sessions (#441)
52
+
53
+ ## [4.12.1] - 2022-04-01
54
+ ### Fixed
55
+ - Fix Lambda plugin: support Ruby <2.5 (#428)
56
+
57
+ ## [4.12.0] - 2022-03-30
58
+ ### Added
59
+ - Added `hb_wrap_handler` to automatically capture AWS Lambda handler errors
60
+
61
+ ### Fixed
62
+ - Change `:exception_message` key name to just `:exception` for error breadcrumb metadata.
63
+
64
+ ## [4.11.0] - 2022-02-15
65
+ ### Fixed
66
+ - Allow special characters in tags. Also support space-delimited tags:
67
+ "one two three" and "one, two, three" are equivalent
68
+
69
+ ## [4.10.0] - 2022-01-19
70
+ ### Added
71
+ - Add more items to the default config file
72
+
73
+ ### Fixed
74
+ - Fix a Ruby 3.1 bug that breaks regexp classes in honeybadger.yml (#418)
75
+
76
+ ## [4.9.0] - 2021-06-28
77
+ ### Fixed
78
+ - Replaced fixed number for retries in Sidekiq Plugin with Sidekiq::JobRetry constant
79
+ - Properly set environment in deployment tracking (#404, @stmllr)
80
+
81
+ ### Added
82
+ - Added 'ActionDispatch::Http::MimeNegotiation::InvalidType' (Rails 6.1) to
83
+ default ignore list. (#402, @jrochkind)
84
+
85
+ ## [4.8.0] - 2021-03-16
86
+ ### Fixed
87
+ - Suppress any error output from the `git rev-parse` command. ([#394](https://github.com/honeybadger-io/honeybadger-ruby/pull/394))
88
+
89
+ ### Added
90
+ - Support deployment tracking in code (#397, @danleyden)
91
+
92
+ ## [4.7.3] - 2021-02-10
93
+ ### Fixed
94
+ - Don't enable Lambda plugin in non-Lambda execution environments
95
+
96
+ ## [4.7.2] - 2020-08-17
97
+ ### Fixed
98
+ - Remove usage of `ActiveRecord::Base.connection` (thanks @jcoyne for testing)
99
+ - Check for UTF-8 in ActiveRecord breadcrumb exclusion filter
100
+
101
+ ## [4.7.1] - 2020-08-11
102
+ ### Fixed
103
+ - ActiveRecord SQL Breadcrumb event pulls adapter from supplied connection,
104
+ allowing for multiple databases.
105
+ - Fix Rails deprecation of `ActionDispatch::ParamsParser::ParseError`
106
+ - Deal with invalid UTF-8 byte sequences during SQL obfuscation
107
+ - Fix Ruby 2.7 deprecation notice in sql.rb
108
+
109
+ ## [4.7.0] - 2020-06-02
110
+ ### Fixed
111
+ - Alias `Notice#controller=` as `Notice#component=`
112
+ - Fix Rails 6.1 deprecation warning with `ActiveRecord::Base.connection_config`
113
+ - Fix agent where breadcrumbs.enabled = true and local_context = true
114
+
115
+ ### Added
116
+ - Add `honeybadger_skip_rails_load` Capistrano option to skip rails load on
117
+ deployment notification (#355) -@NielsKSchjoedt
118
+
119
+ ## [4.6.0] - 2020-03-12
120
+ ### Fixed
121
+ - Fixed issue where Sidekiq.attempt_threshold was triggering 2 attempts ahead
122
+ of the setting
123
+ - Dupe notify opts before mutating (#345)
124
+
125
+ ### Changed
126
+ - Breadcrumbs on by default
127
+ - Added Faktory plugin -@scottrobertson
128
+
129
+ ## [4.5.6] - 2020-01-08
130
+ ### Fixed
131
+ - Fix remaining Ruby 2.7 deprecation warnings
132
+
133
+ ## [4.5.5] - 2020-01-06
134
+ ### Fixed
135
+ - Replace empty `Proc.new` with explicit block param to suppress warnings
136
+ in Ruby 2.7
137
+
138
+ ## [4.5.4] - 2019-12-09
139
+ ### Fixed
140
+ - Re-released to remove vendor cruft
141
+
142
+ ## [4.5.3] - 2019-12-09
143
+ ### Fixed
144
+ - Include Context in Notices for failed Resque jobs
145
+
146
+ ## [4.5.2] - 2019-10-09
147
+ ### Changed
148
+ - Added parameter filtering to breadcrumb metadata (#329)
149
+
150
+ ### Added
151
+ - Added `lambda` plugin which forces sync mode (to make sure that we are not
152
+ sending notices in another thread) and adds extra lambda details to the
153
+ Notice. (honeybadger-ruby-internal#1)
154
+
155
+ ## [4.5.1] - 2019-08-13
156
+ ### Fixed
157
+ - Logging breadcrumbs will not crash anymore when logging is done using a block
158
+ form. -@Bajena
159
+ - When `breadcrumbs` are enabled ensure we call the original `Logger#add` with
160
+ the original arguments -@JanStevens
161
+
162
+ ## [4.5.0] - 2019-08-05
163
+ ### Changed
164
+ - Default `max_queue_size` has been reduced from 1000 to 100.
165
+
166
+ ### Added
167
+ - Added `Notice#causes`, which allows cause data to be mutated in
168
+ `before_notify` callbacks (useful for filtering purposes).
169
+ - Added `Notice#cause=`, which allows the cause to be changed or disabled
170
+ in `before_notify` callbacks.
171
+ - Added extra shutdown logging.
172
+
173
+ ### Fixed
174
+ - `Honeybadger.notify(exception, cause: nil)` will now prevent the cause from
175
+ being reported.
176
+ - When throttled, queued notices will be discarded during shutdown.
177
+
178
+ ## [4.4.2] - 2019-08-01
179
+ ### Fixed
180
+ - Handle ActiveSupport::Notifications passing nil started or finished time
181
+ -@pcreux
182
+
183
+ ## [4.4.1] - 2019-07-30
184
+ ### Fixed
185
+ - Allow non-strings to be passed to breadcrumbs logger
186
+
187
+ ## [4.4.0] - 2019-07-24
188
+ ### Added
189
+ - Added the ability to store and send Breadcrumbs along with the notice.
190
+ Breadcrumbs are disabled by default in this version so they must be enabled
191
+ via the config (option `breadcrumbs.enabled`) to work.
192
+
193
+ ## [4.3.1] - 2019-05-30
194
+ ### Fixed
195
+ - Add Rails 6 RC1 Support
196
+
197
+ ## [4.3.0] - 2019-05-17
198
+ ### Added
199
+ - Send a value for action when reporting a component for Sidekiq jobs -@stympy
200
+
201
+ ## [4.2.2] - 2019-04-25
202
+ ### Fixed
203
+ - Fix a bug where some non-standard backtraces could not be parsed, resulting in
204
+ an error when sending error reports. Backtraces are now explicitly converted
205
+ to arrays, and lines are converted to strings.
206
+ - Fix a typo in throttle log message. -@mobilutz
207
+
208
+ ## [4.2.1] - 2019-02-01
209
+ ### Fixed
210
+ - Fix #301 - before_notify hooks are overridden on subsequent
211
+ `Honeybadger.configure` calls.
212
+ - Revert "Get the right controller / action name in Rails, when using an
213
+ exception app for custom error pages."
214
+
215
+ ## [4.2.0] - 2019-01-31
216
+ ### Changed
217
+ - Issue a Notification from a Sidekiq job when either the `sidekiq.attempt_threshold` is reached OR if the job defined retry threshold is reached, whichever comes first. -@mstruve
218
+ - Updated supported Ruby/Rails versions (MRI >= 2.3.0, JRuby >= 9.2, Rails >= 4.2)
219
+ https://docs.honeybadger.io/ruby/gem-reference/supported-versions.html
220
+
221
+ ### Added
222
+ - Get the right controller / action name in Rails, when using an exception app for custom error pages. -@fernandes
223
+
224
+ ## [4.1.0] - 2018-10-16
225
+ ### Added
226
+ - Added flag `--skip-rails-load` to cli commands for optionally skipping Rails initialization when running from a Rails root.
227
+
228
+ ### Fixed
229
+ - Added missing Backend::Server#check_in specs
230
+ - Fix a memory leak in the worker queue (jruby)
231
+
232
+ ## [4.0.0] - 2018-08-21
233
+ ### Added
234
+ - Added `before_notify` hooks to be defined, this allows setting up of multiple
235
+ hooks which will be invoked with a `notice` before a `notice` is sent. Each
236
+ `before_notify` hook MUST be a `callable` (lambda, Proc etc,) with an arity of 1.
237
+ - Added the ability to halt notices in callbacks using `notice.halt!`
238
+ - Make essential attributes on Notice writable:
239
+ ```ruby
240
+ Honeybadger.configure do |config|
241
+ config.before_notify do |notice|
242
+ notice.api_key = 'custom api key',
243
+ notice.error_message = "badgers!",
244
+ notice.error_class = 'MyError',
245
+ notice.backtrace = ["/path/to/file.rb:5 in `method'"],
246
+ notice.fingerprint = 'some unique string',
247
+ notice.tags = ['foo', 'bar'],
248
+ notice.context = { user: 33 },
249
+ notice.controller = 'MyController',
250
+ notice.action = 'index',
251
+ notice.parameters = { q: 'badgers?' },
252
+ notice.session = { uid: 42 },
253
+ notice.url = "/badgers",
254
+ end
255
+ end
256
+ ```
257
+
258
+ ### Fixed
259
+ - Ignore SIGTERM SignalExceptions.
260
+
261
+ ### Removed
262
+ - Removed Notice#[]
263
+
264
+ ### Changed
265
+ - The public method `Notice#backtrace` is now exposed as the raw Ruby
266
+ backtrace instead of an instance of `Honeybadger::Backtrace` (a private
267
+ class).
268
+
269
+ Before:
270
+ ```ruby
271
+ notice.backtrace # => #<Honeybadger::Backtrace>
272
+ ```
273
+
274
+ After:
275
+ ```ruby
276
+ notice.backtrace # => ["/path/to/file.rb:5 in `method'"]
277
+ ```
278
+ - `notice[:context]` now defaults to an empty Hash instead of nil.
279
+
280
+ Before:
281
+ ```ruby
282
+ notice[:context] # => nil
283
+ ```
284
+
285
+ After:
286
+ ```ruby
287
+ notice[:context] # => {}
288
+ ```
289
+ - The public method `Notice#fingerprint` now returns the original
290
+ String which was passed in from the `:fingerprint` option or the
291
+ `exception_fingerprint` callback, not a SHA1 hashed value. The value is
292
+ still hashed before sending through to the API.
293
+ - The public method `Honeybadger.exception_filter` has been deprecated in favor
294
+ of `before_notify`:
295
+ ```ruby
296
+ Honeybadger.configure do |config|
297
+ config.before_notify do |notice|
298
+ notice.halt!
299
+ end
300
+ end
301
+ ```
302
+ - The public method `Honeybadger.exception_fingerprint` has been deprecated in favor
303
+ of `before_notify`:
304
+ ```ruby
305
+ Honeybadger.configure do |config|
306
+ config.before_notify do |notice|
307
+ notice.fingerprint = 'new fingerprint'
308
+ end
309
+ end
310
+ ```
311
+ - The public method `Honeybadger.backtrace_filter` has been deprecated in favor
312
+ of `before_notify`:
313
+ ```ruby
314
+ Honeybadger.configure do |config|
315
+ config.before_notify do |notice|
316
+ notice.backtrace.reject!{|x| x =~ /gem/}
317
+ end
318
+ end
319
+ ```
320
+
321
+ ### Removed
322
+ - The `disabled` option is now removed, Use the `report_data` option instead.
323
+
324
+ ## [3.3.1] - 2018-08-02
325
+ ### Fixed
326
+ - Fix synchronous throttling in shoryuken
327
+
328
+ ## [3.3.0] - 2018-01-29
329
+ ### Changed
330
+ - Use prepend to add Sidekiq Middleware to fix context getting cleared.
331
+ - Add `Rack::QueryParser::ParameterTypeError` and
332
+ `Rack::QueryParser::InvalidParameterError` to default ignore list.
333
+
334
+ ### Fixed
335
+ - Use a unique route name in rails to avoid name conflicts.
336
+ - Fix `at_exit` callback being skipped in rails apps with a sinatra dependency.
337
+
338
+ ## [3.2.0] - 2017-11-27
339
+ ### Changed
340
+ - Objects which explicitly alias `#to_s` to `#inspect` (such as `OpenStruct`) are
341
+ now sanitized. `'#<OpenStruct attribute="value">'` becomes `'#<OpenStruct>'`.
342
+ If you pass the value of `#inspect` (as a `String`) directly to Honeybadger (or
343
+ return it from `#to_honeybadger`), the value will not be sanitized.
344
+ - We're now using `String(object)` instead of `object.to_s` as the last resort
345
+ during sanitization.
346
+
347
+ ### Added
348
+ - The exception cause may now be set using an optional `:cause` option when
349
+ calling `Honeybadger.notify`. If not present, the exception's cause will be
350
+ used, or the global `$!` exception if available.
351
+ - Any object can now act as context using the `#to_honeybadger_context` method.
352
+ The method should have no arguments and return a `Hash` of context data.
353
+ Context from exceptions which define this method will automatically be
354
+ included in error reports.
355
+ - Final object representations in Honeybadger (normally the value of `#to_s`
356
+ for unknown types) can be changed by defining the `#to_honeybadger` method. If
357
+ the method is defined, the return value of that method will be sent to Honeybadger
358
+ instead of the `#to_s` value (for context values, local variables, etc.).
359
+ - `'[RAISED]'` is returned when `object.to_honeybadger` or `String(object)` fails.
360
+ - Added `Honeybadger.check_in` method which allows performing check ins from ruby.
361
+
362
+ ### Fixed
363
+ - We no longer use "/dev/null" as the default log device as it doesn't exist on
364
+ Windows.
365
+ - Logs when reporting errors in development mode now mention that the error wasn't
366
+ *actually* reported. :)
367
+ - Support new Sidekiq job params key.
368
+ - Move at_exit callback to an appropriate place for sinatra apps, so that it does
369
+ not prematurely stop honeybadger workers.
370
+ - `BasicObject`, which previously could not be serialized, is now serialized as
371
+ `"#<BasicObject>"`.
372
+
373
+ ## [3.1.2] - 2017-04-20
374
+ ### Fixed
375
+ - Fixed a bug in the Resque plugin which prevented error reports from being
376
+ sent. The issue was that the Resque's callbacks were executed in an unexpected
377
+ order which caused the queue to be flushed before error notification instead
378
+ of after.
379
+
380
+ ## [3.1.1] - 2017-04-13
381
+ ### Fixed
382
+ - `honeybadger deploy` cli command now reads default environment from
383
+ honeybadger.yml/environment variable.
384
+ - Fixed a conflict with the web-console gem.
385
+
386
+ ## [3.1.0] - 2017-03-01
387
+ ### Changed
388
+ - Exceptions encountered while loading/evaluating honeybadger.yml are now raised
389
+ instead of logged.
390
+
391
+ ### Added
392
+ - Friendlier backtraces for exceptions originating in honeybadger.yml.
393
+ - Notify errors in Shoryuken batches -@phstc
394
+
395
+ ### Fixed
396
+ - Rails environment is now loaded when running `honeybadger` cli from a Rails
397
+ root. This fixes an issue where programmatic configuration from Rails was not
398
+ loaded.
399
+ - Fixed logger isn't being overridden properly when configuring with
400
+ Honeybadger.configure -@anujbiyani
401
+
402
+ ## [3.0.2] - 2017-02-16
403
+ ### Fixed
404
+ - Fixed a bug caused by an interaction with the semantic\_logger gem.
405
+
406
+ ## [3.0.1] - 2017-02-10
407
+ ### Fixed
408
+ - Fixed a bug which caused a NoMethodError (undefined method \`start_with?') when
409
+ Rack env contained non-string keys.
410
+
411
+ ## [3.0.0] - 2017-02-06
412
+ ### Added
413
+ - You may now require 'honeybadger/ruby' instead of 'honeybadger' to get the
414
+ agent without the integrations (no railtie, plugins or monkey patching).
415
+ - You can now create multiple instances of the Honeybadger agent with different
416
+ configurations (many classes in the library can be composed).
417
+ - `Honeybadger.configure` works again -- use it to configure the library from
418
+ Ruby! (we still default to honeybadger.yml in our installer)
419
+ - Our test suite is now leaner and meaner (which means we can add new features
420
+ faster). Reduced typical build times from up to 2 minutes to 20 seconds.
421
+ - We've rebuilt the CLI from scratch. The new CLI features super verbose error
422
+ messages with (hopefully) helpful suggestions, some new commands, and better
423
+ framework detection in the `install` and `test` commands.
424
+ - Use `honeybadger exec your_command` from the command line to report the error
425
+ when the command fails due to a non-zero exit status or standard error output.
426
+ (Use it to report failures in cron!) See `honeybadger help exec`.
427
+ - Use `honeybadger notify` from the command line to report custom errors to
428
+ Honeybadger. See `honeybadger help notify`.
429
+ - ~/honeybadger.yml is now a default config path for the CLI and standalone-ruby
430
+ installations.
431
+ - `Honeybadger.notify` now converts arguments which are not `Exception` or
432
+ `Hash` types to strings and assigns them as the error message. Example:
433
+ `Honeybadger.notify("Something went wrong")`.
434
+ - The currently deployed git revision is now detected automatically and sent
435
+ with error reports.
436
+
437
+ ### Changed
438
+ - `Honeybadger.start` has been deprecated and has no effect.
439
+ - We've changed some of the underlying code of the library. If you depend on
440
+ internal APIs (such as thread local variable names or any functions not marked
441
+ public in the code comments) then you may need to update your code. If you are
442
+ developing 3rd-party integrations with our gem [let us
443
+ know](https://github.com/honeybadger-io/honeybadger-ruby/issues) so that we can
444
+ work with you to build the public APIs you need.
445
+ - All Rack middleware no longer require an argument (which used to be a
446
+ `Honeybadger::Config` instance) when using them. They now default to the
447
+ global agent and accept an optional argument which expects an alternate
448
+ `Honeybadger::Agent` instance.
449
+ - The *plugins.skip* config option has been renamed to *skipped_plugins*.
450
+ - The *sidekiq.use_component* config option is now `true` by default. To get the
451
+ old behavior, set it to `false`. When enabled, the Sidekiq plugin will
452
+ automatically set the component to the class of the job, which helps with
453
+ grouping.
454
+ - The `request.filter_keys` option now includes partial matches: with the filter
455
+ value "password", keys such as "password" and "otherpassword" will be
456
+ filtered.
457
+ - CGI variables are now whitelisted when sending the Rack environment to
458
+ Honeybadger to prevent sensitive data leakage.
459
+ - `Honeybadger.notify` now raises an exception in development mode when called
460
+ without the required arguments. It logs outside of development and continues
461
+ to send a generic error report.
462
+
463
+ ### Removed
464
+ - Ruby 1.9.3 and 2.0.x are no longer supported.
465
+ - `Honeybadger.notify_or_ignore` has been removed. Use `Honeybadger.notify(e)`
466
+ and `Honeybadger.notify(e, force: true)` (to skip ignore filters).
467
+ - The CLI command `honeybadger config` has been removed.
468
+ - All deprecated Rails controller methods (from version 1.x) have been removed.
469
+ - The deprecated `Honeybadger::Rack::MetricsReporter` middleware has been
470
+ removed.
471
+
472
+ ### Fixed
473
+ - Arrays are no longer compacted during sanitization (`nil` values will be sent
474
+ as they originally appeared).
475
+ - Resque plugin now reports `Resque::DirtyExit` exceptions.
476
+
477
+ ## [2.7.2] - 2016-12-12
478
+ ### Fixed
479
+ - Pass whole exception to `notify_or_ignore` (includes causes). -@CGamesPlay
480
+
481
+ ## [2.7.1] - 2016-11-16
482
+ ### Fixed
483
+ - Fix a Sinatra bug where `RACK_ENV` default was not used as default env.
484
+ - Fixed an error when accessing notice request data from `exception_fingerprint`
485
+ callback.
486
+
487
+ ## [2.7.0] - 2016-10-20
488
+ ### Added
489
+ - Support Sinatra 2.0.
490
+ - Source snippets are now sent for every line of the backtrace.
491
+
492
+ ### Changed
493
+ - Sunset performance metrics. See
494
+ http://blog.honeybadger.io/sunsetting-performance-metrics/
495
+ - Backtraces are now limited to a maximum of 1000 lines.
496
+
497
+ ## [2.6.1] - 2016-08-24
498
+ ### Added
499
+ - shoryuken plugin. -@ivanvc
500
+
501
+ ### Fixed
502
+ - Handle `Errno::ENETUNREACH` error when contacting server. -@tank-bohr
503
+ - Remove `ActionDispatch::Http::Headers` from trace payload (fixes `IOError`
504
+ when JSON encoding traces in Rails 5).
505
+ - Fix "`invoke("git:set_current_revision")` already invoked" warning in
506
+ Capistrano 3.6.
507
+
508
+ ## [2.6.0] - 2016-04-22
509
+ ### Added
510
+ - Automatically report unhandled exceptions at exit.
511
+ - Add `Honeybadger.get_context` method. -@homanchou
512
+
513
+ ### Changed
514
+ - Filter Authorization header (HTTP\_AUTHORIZATION) by default.
515
+
516
+ ### Fixed
517
+ - Always convert to string when sanitizing strings.
518
+ - Fix potential performance issue due to and `ensure` block. See #186.
519
+
520
+ ## [2.5.3] - 2016-03-10
521
+ ### Fixed
522
+ - Squashed a bug where the wrong source extract was sent for some instances of
523
+ `ActionView::Template::Error`.
524
+
525
+ ## [2.5.2] - 2016-03-08
526
+ ### Fixed
527
+ - Allow plugin names in config to be symbols or strings (#177).
528
+ - Fix bug in resque-retry logic. -@davidguthu
529
+
530
+ ## [2.5.1] - 2016-02-22
531
+ ### Fixed
532
+ - Fix bug in resque-retry logic. -@davidguthu
533
+
534
+ ## [2.5.0] - 2016-02-19
535
+ ### Added
536
+ - Configuration option max\_queue_size for maximum worker queue size.
537
+ - Add `resque.resque_retry.send_exceptions_when_retrying` config option.
538
+ -@davidguthu
539
+
540
+ ## [2.4.1] - 2016-02-04
541
+ ### Fixed
542
+ - Never send traces or metrics when disabled by plan or config.
543
+
544
+ ## [2.4.0] - 2016-02-02
545
+ ### Added
546
+ - [Sucker Punch](https://github.com/brandonhilkert/sucker_punch) support
547
+
548
+ ## [2.3.3] - 2016-01-06
549
+ ### Fixed
550
+ - Fixed a bug which caused a Passenger-related error message when booting a
551
+ heroku console.
552
+
553
+ ## [2.3.2] - 2015-12-15
554
+ ### Fixed
555
+ - Be stricter when sanitizing recursive objects (allow only `Hash`, `Array`,
556
+ `Set`). This fixes a bug where some gems (such as the dropbox gem)
557
+ monkeypatch `#to_hash` on `Array`.
558
+
559
+ ## [2.3.1] - 2015-11-20
560
+ ### Fixed
561
+ - Handle invalid utf8 in ActiveRecord SQL queries.
562
+
563
+ ## [2.3.0] - 2015-11-12
564
+ ### Added
565
+ - Rails 5 support.
566
+ - Support overriding TTY behavior in rake reporter.
567
+
568
+ ### Fixed
569
+ - Capistrano 3 `undefined method `verbosity'` bugfix.
570
+ - Fixed "uninitialized constant Set" error when Set is not previously required.
571
+
572
+ ## [2.2.0] - 2015-10-29
573
+ ### Added
574
+ - Added a config option to automatically set the component to the class name of the
575
+ Sidekiq job where an error originated. Causes errors to be grouped by worker
576
+ in addition to class name/location.
577
+
578
+ ### Fixed
579
+ - Always refresh capistrano revision during deploy notification.
580
+ - Support capistrano-chruby. -Kyle Rippey
581
+ - Send the wrapped class name for Sidekiq traces when using a wrapper such as
582
+ ActiveJob.
583
+ - Performance tuning for Sidekiq plugin.
584
+
585
+ ## [2.1.5] - 2015-09-23
586
+ ### Fixed
587
+ - Apply parameter filters to local variables.
588
+
589
+ ## [2.1.4] - 2015-09-02
590
+ ### Fixed
591
+ - Support windows paths when loading plugins. -@aharpervc
592
+
593
+ ## [2.1.3] - 2015-07-24
594
+ ### Added
595
+ - Don't send empty local_variables in payload when disabled.
596
+ - Better logging of reason when API requests are denied.
597
+ - Truncate long queries in traces rather than tossing them.
598
+
599
+ ### Fixed
600
+ - Missing vendor libs.
601
+
602
+ ## [2.1.2][yanked]
603
+
604
+ ## [2.1.1] - 2015-07-15
605
+ ### Added
606
+ - Update heroku cli deprecations. -@adamkuipers
607
+ - Don't insert middleware if they're disabled. -Bradley Priest
608
+ - Don't send RAW_POST_DATA.
609
+ - Filter HTTP_COOKIE in request cgi_data. -Sam McTaggart
610
+ - Support for extracting the correct component & action for Rails Active Jobs
611
+ (previously all Active Jobs where reported as
612
+ 'ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper'). -Panos Korros
613
+
614
+ ### Fixed
615
+ - Fix breakage relating to Exceptions containing a :cause attribute which is not
616
+ itself an Exception. -Gabe da Silveira
617
+
618
+ ## [2.1.0] - 2015-06-04
619
+ ### Added
620
+ - Add events to instrumented traces (i.e. in background jobs).
621
+ - Restart workers once per hour when shutdown due to 40x.
622
+ - Send request data with traces.
623
+ - Support Resque natively.
624
+ - Configure sidekiq.attempt_threshold to suppress notifications until retry
625
+ threshold is reached.
626
+ - Add exceptions.unwrap to config.
627
+
628
+ ### Changed
629
+ - Trim all sanitized strings to 2k.
630
+ - Ditch per-controller metrics and add render_partial event to traces. -Benjamin Curtis
631
+ - Exit with 1 from deploy command when request fails but ignore the failures in
632
+ the capistrano task.
633
+ - Update default ignored exceptions to include the latest Rails rescue
634
+ responses. (see issue #107)
635
+ - Exceptions with the same type but caused within different delayed jobs are not
636
+ grouped together. They have their component and action set so that the
637
+ application class name and excecuted action is displayed in the UI. -Panos
638
+ Korros
639
+ - All events logged within a delayed_job even those logged by Honeybadger.notify
640
+ inherit the context of the delayed job and include the job_id, attempts,
641
+ last_error and queue. -Panos Korros
642
+
643
+ ### Fixed
644
+ - Allow API key to be overridden from `Honeybadger.notify`.
645
+ - Fix a tracing issue with net/http requests.
646
+ - Disable local variables when BetterErrors is detected.
647
+ - Prevent Sinatra from using the same middleware more than once and add
648
+ sinatra.enabled setting (default true) to disable auto-initialization
649
+ of Sinatra.
650
+ - Catch Errno::ENFILE when reading system stats. -Dmitry Polushkin
651
+ - Use explicit types for config options when casting from ENV.
652
+
653
+ ## [2.0.12] - 2015-04-27
654
+ ### Fixed
655
+ - Fix bug when processing source extract for action_view templates.
656
+
657
+ ## [2.0.11] - 2015-04-02
658
+ ### Fixed
659
+ - Don't access secrets before Rails initialization.
660
+ - Fix a bug which introduced a hard-dependency on Rack.
661
+
662
+ ## [2.0.10] - 2015-03-24
663
+ ### Added
664
+ - Add support for honeybadger_user with Capistrano 2. -Nathan Fixler
665
+
666
+ ### Fixed
667
+ - Fix a bug in ping where JSON was double-quoted.
668
+
669
+ ## [2.0.9] - 2015-03-15
670
+ ### Fixed
671
+ - Fixed a bug introduced in v2.0.8 which applied params filters to backtrace.
672
+ - Fail gracefully when honeybadger.yml is empty or invalid.
673
+
674
+ ## [2.0.8] - 2015-03-11
675
+ ### Added
676
+ - Include full backtrace when logging worker exceptions.
677
+ - Always send a test notice on install.
678
+ - Send the id of the current process with error reports.
679
+
680
+ ### Fixed
681
+ - Handle bad encodings in exception payloads.
682
+
683
+ ## [2.0.7][yanked] - 2015-03-11
684
+
685
+ ## [2.0.6] - 2015-02-16
686
+ ### Fixed
687
+ - Don't sub partial project root in backtrace lines.
688
+
689
+ ## [2.0.5] - 2015-02-12
690
+ ### Added
691
+ - Merge exceptions.ignore config values with default ignored exception class
692
+ names and add exceptions.ignore_only option to override.
693
+
694
+ ## [2.0.4] - 2015-02-10
695
+ ### Added
696
+ - Support for capistrano-rbenv gem in Capistrano task. -Chris Gunther
697
+
698
+ ## [2.0.3] - 2015-02-10
699
+ ### Fixed
700
+ - Support for capistrano-rvm gem in Capistrano task. -Kyle Rippey
701
+ - Don't require honeybadger.yml to be writable when reading.
702
+
703
+ ## [2.0.2] - 2015-02-04
704
+ ### Fixed
705
+ - Detect ActionDispatch::TestProcess being included globally, fix issue locally,
706
+ warn the user.
707
+ - Fix a nil logger bug when a config error occurs.
708
+
709
+ ## [2.0.1] - 2015-01-30
710
+ ### Fixed
711
+ - Don't instrument metrics and traces in Rails when features are not available
712
+ on account.
713
+ - Don't send error reports when disabled via configuration.