honeybadger 5.2.0 → 5.2.1

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