honeybadger 5.1.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 -713
  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 -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 -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 -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/hanami.rb +19 -0
  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 -51
  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 -11
  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 +4 -3
data/CHANGELOG.md CHANGED
@@ -1,713 +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.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.
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.