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