honeybadger 5.0.2 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +713 -701
  3. data/LICENSE +19 -19
  4. data/README.md +57 -57
  5. data/TROUBLESHOOTING.md +3 -3
  6. data/bin/honeybadger +5 -5
  7. data/lib/honeybadger/agent.rb +488 -488
  8. data/lib/honeybadger/backend/base.rb +116 -116
  9. data/lib/honeybadger/backend/debug.rb +22 -22
  10. data/lib/honeybadger/backend/null.rb +29 -29
  11. data/lib/honeybadger/backend/server.rb +62 -62
  12. data/lib/honeybadger/backend/test.rb +46 -46
  13. data/lib/honeybadger/backend.rb +27 -27
  14. data/lib/honeybadger/backtrace.rb +181 -181
  15. data/lib/honeybadger/breadcrumbs/active_support.rb +119 -119
  16. data/lib/honeybadger/breadcrumbs/breadcrumb.rb +53 -53
  17. data/lib/honeybadger/breadcrumbs/collector.rb +82 -82
  18. data/lib/honeybadger/breadcrumbs/logging.rb +51 -51
  19. data/lib/honeybadger/breadcrumbs/ring_buffer.rb +44 -44
  20. data/lib/honeybadger/breadcrumbs.rb +8 -8
  21. data/lib/honeybadger/cli/deploy.rb +43 -43
  22. data/lib/honeybadger/cli/exec.rb +143 -143
  23. data/lib/honeybadger/cli/helpers.rb +28 -28
  24. data/lib/honeybadger/cli/heroku.rb +129 -129
  25. data/lib/honeybadger/cli/install.rb +101 -101
  26. data/lib/honeybadger/cli/main.rb +237 -237
  27. data/lib/honeybadger/cli/notify.rb +67 -67
  28. data/lib/honeybadger/cli/test.rb +267 -267
  29. data/lib/honeybadger/cli.rb +14 -14
  30. data/lib/honeybadger/config/defaults.rb +336 -333
  31. data/lib/honeybadger/config/env.rb +42 -42
  32. data/lib/honeybadger/config/ruby.rb +146 -146
  33. data/lib/honeybadger/config/yaml.rb +76 -76
  34. data/lib/honeybadger/config.rb +413 -413
  35. data/lib/honeybadger/const.rb +20 -20
  36. data/lib/honeybadger/context_manager.rb +55 -55
  37. data/lib/honeybadger/conversions.rb +16 -16
  38. data/lib/honeybadger/init/rails.rb +38 -38
  39. data/lib/honeybadger/init/rake.rb +66 -66
  40. data/lib/honeybadger/init/ruby.rb +11 -11
  41. data/lib/honeybadger/init/sinatra.rb +51 -51
  42. data/lib/honeybadger/logging.rb +177 -177
  43. data/lib/honeybadger/notice.rb +579 -568
  44. data/lib/honeybadger/plugin.rb +210 -210
  45. data/lib/honeybadger/plugins/breadcrumbs.rb +111 -111
  46. data/lib/honeybadger/plugins/delayed_job/plugin.rb +56 -56
  47. data/lib/honeybadger/plugins/delayed_job.rb +22 -22
  48. data/lib/honeybadger/plugins/faktory.rb +52 -52
  49. data/lib/honeybadger/plugins/lambda.rb +71 -71
  50. data/lib/honeybadger/plugins/local_variables.rb +44 -44
  51. data/lib/honeybadger/plugins/passenger.rb +23 -23
  52. data/lib/honeybadger/plugins/rails.rb +72 -63
  53. data/lib/honeybadger/plugins/resque.rb +72 -72
  54. data/lib/honeybadger/plugins/shoryuken.rb +52 -52
  55. data/lib/honeybadger/plugins/sidekiq.rb +71 -62
  56. data/lib/honeybadger/plugins/sucker_punch.rb +18 -18
  57. data/lib/honeybadger/plugins/thor.rb +32 -32
  58. data/lib/honeybadger/plugins/warden.rb +19 -19
  59. data/lib/honeybadger/rack/error_notifier.rb +92 -92
  60. data/lib/honeybadger/rack/user_feedback.rb +88 -88
  61. data/lib/honeybadger/rack/user_informer.rb +45 -45
  62. data/lib/honeybadger/ruby.rb +2 -2
  63. data/lib/honeybadger/singleton.rb +103 -103
  64. data/lib/honeybadger/tasks.rb +22 -22
  65. data/lib/honeybadger/templates/feedback_form.erb +84 -84
  66. data/lib/honeybadger/util/http.rb +92 -92
  67. data/lib/honeybadger/util/lambda.rb +32 -32
  68. data/lib/honeybadger/util/request_hash.rb +73 -73
  69. data/lib/honeybadger/util/request_payload.rb +41 -41
  70. data/lib/honeybadger/util/revision.rb +39 -39
  71. data/lib/honeybadger/util/sanitizer.rb +214 -214
  72. data/lib/honeybadger/util/sql.rb +34 -34
  73. data/lib/honeybadger/util/stats.rb +50 -50
  74. data/lib/honeybadger/version.rb +4 -4
  75. data/lib/honeybadger/worker.rb +253 -253
  76. data/lib/honeybadger.rb +11 -11
  77. data/resources/ca-bundle.crt +3376 -3376
  78. data/vendor/capistrano-honeybadger/lib/capistrano/honeybadger.rb +5 -5
  79. data/vendor/capistrano-honeybadger/lib/capistrano/tasks/deploy.cap +89 -89
  80. data/vendor/capistrano-honeybadger/lib/honeybadger/capistrano/legacy.rb +47 -47
  81. data/vendor/capistrano-honeybadger/lib/honeybadger/capistrano.rb +2 -2
  82. data/vendor/cli/inifile.rb +628 -628
  83. data/vendor/cli/thor/actions/create_file.rb +103 -103
  84. data/vendor/cli/thor/actions/create_link.rb +59 -59
  85. data/vendor/cli/thor/actions/directory.rb +118 -118
  86. data/vendor/cli/thor/actions/empty_directory.rb +135 -135
  87. data/vendor/cli/thor/actions/file_manipulation.rb +316 -316
  88. data/vendor/cli/thor/actions/inject_into_file.rb +107 -107
  89. data/vendor/cli/thor/actions.rb +319 -319
  90. data/vendor/cli/thor/base.rb +656 -656
  91. data/vendor/cli/thor/command.rb +133 -133
  92. data/vendor/cli/thor/core_ext/hash_with_indifferent_access.rb +77 -77
  93. data/vendor/cli/thor/core_ext/io_binary_read.rb +10 -10
  94. data/vendor/cli/thor/core_ext/ordered_hash.rb +98 -98
  95. data/vendor/cli/thor/error.rb +32 -32
  96. data/vendor/cli/thor/group.rb +281 -281
  97. data/vendor/cli/thor/invocation.rb +178 -178
  98. data/vendor/cli/thor/line_editor/basic.rb +35 -35
  99. data/vendor/cli/thor/line_editor/readline.rb +88 -88
  100. data/vendor/cli/thor/line_editor.rb +17 -17
  101. data/vendor/cli/thor/parser/argument.rb +73 -73
  102. data/vendor/cli/thor/parser/arguments.rb +175 -175
  103. data/vendor/cli/thor/parser/option.rb +125 -125
  104. data/vendor/cli/thor/parser/options.rb +218 -218
  105. data/vendor/cli/thor/parser.rb +4 -4
  106. data/vendor/cli/thor/rake_compat.rb +71 -71
  107. data/vendor/cli/thor/runner.rb +322 -322
  108. data/vendor/cli/thor/shell/basic.rb +421 -421
  109. data/vendor/cli/thor/shell/color.rb +149 -149
  110. data/vendor/cli/thor/shell/html.rb +126 -126
  111. data/vendor/cli/thor/shell.rb +81 -81
  112. data/vendor/cli/thor/util.rb +267 -267
  113. data/vendor/cli/thor/version.rb +3 -3
  114. data/vendor/cli/thor.rb +484 -484
  115. metadata +10 -5
@@ -1,333 +1,336 @@
1
- require 'socket'
2
- require 'honeybadger/breadcrumbs/active_support'
3
-
4
- module Honeybadger
5
- class Config
6
- class Boolean; end
7
-
8
- IGNORE_DEFAULT = ['ActionController::RoutingError',
9
- 'AbstractController::ActionNotFound',
10
- 'ActionController::MethodNotAllowed',
11
- 'ActionController::UnknownHttpMethod',
12
- 'ActionController::NotImplemented',
13
- 'ActionController::UnknownFormat',
14
- 'ActionController::InvalidAuthenticityToken',
15
- 'ActionController::InvalidCrossOriginRequest',
16
- # ActionDispatch::ParamsParser::ParseError was removed in Rails 6.0
17
- # and may be removed here once support for Rails 5.2 is dropped.
18
- # https://github.com/rails/rails/commit/e16c765ac6dcff068ff2e5554d69ff345c003de1
19
- # https://github.com/honeybadger-io/honeybadger-ruby/pull/358
20
- 'ActionDispatch::ParamsParser::ParseError',
21
- 'ActionDispatch::Http::Parameters::ParseError',
22
- 'ActionController::BadRequest',
23
- 'ActionController::ParameterMissing',
24
- 'ActiveRecord::RecordNotFound',
25
- 'ActionController::UnknownAction',
26
- 'ActionDispatch::Http::MimeNegotiation::InvalidType',
27
- 'Rack::QueryParser::ParameterTypeError',
28
- 'Rack::QueryParser::InvalidParameterError',
29
- 'CGI::Session::CookieStore::TamperedWithCookie',
30
- 'Mongoid::Errors::DocumentNotFound',
31
- 'Sinatra::NotFound',
32
- 'Sidekiq::JobRetry::Skip'].map(&:freeze).freeze
33
-
34
- DEVELOPMENT_ENVIRONMENTS = ['development', 'test', 'cucumber'].map(&:freeze).freeze
35
-
36
- DEFAULT_PATHS = ['honeybadger.yml', 'config/honeybadger.yml', "#{ENV['HOME']}/honeybadger.yml"].map(&:freeze).freeze
37
-
38
- OPTIONS = {
39
- api_key: {
40
- description: 'The API key for your Honeybadger project.',
41
- default: nil,
42
- type: String
43
- },
44
- env: {
45
- description: 'The current application\'s environment name.',
46
- default: nil,
47
- type: String
48
- },
49
- report_data: {
50
- description: 'Enable/disable reporting of data. Defaults to true for non-development environments.',
51
- default: nil,
52
- type: Boolean
53
- },
54
- root: {
55
- description: 'The project\'s absolute root path.',
56
- default: Dir.pwd,
57
- type: String
58
- },
59
- revision: {
60
- description: 'The git revision of the project.',
61
- default: nil,
62
- type: String
63
- },
64
- hostname: {
65
- description: 'The hostname of the current box.',
66
- default: Socket.gethostname,
67
- type: String
68
- },
69
- backend: {
70
- description: 'An alternate backend to use for reporting data.',
71
- default: nil,
72
- type: String
73
- },
74
- debug: {
75
- description: 'Enables debug logging.',
76
- default: false,
77
- type: Boolean
78
- },
79
- development_environments: {
80
- description: 'Environments which will not report data by default (use report_data to enable/disable explicitly).',
81
- default: DEVELOPMENT_ENVIRONMENTS,
82
- type: Array
83
- },
84
- :'send_data_at_exit' => {
85
- description: 'Send remaining data when Ruby exits.',
86
- default: true,
87
- type: Boolean
88
- },
89
- max_queue_size: {
90
- description: 'Maximum number of items for each worker queue.',
91
- default: 100,
92
- type: Integer
93
- },
94
- plugins: {
95
- description: 'An optional list of plugins to load. Default is to load all plugins.',
96
- default: nil,
97
- type: Array
98
- },
99
- sync: {
100
- description: 'Enable all notices to be sent synchronously. Default is false.',
101
- default: false,
102
- type: Boolean
103
- },
104
- :'skipped_plugins' => {
105
- description: 'An optional list of plugins to skip.',
106
- default: nil,
107
- type: Array
108
- },
109
- :'config.path' => {
110
- description: 'The path (absolute, or relative from config.root) to the project\'s YAML configuration file.',
111
- default: DEFAULT_PATHS,
112
- type: String
113
- },
114
- :'logging.path' => {
115
- description: 'The path (absolute, or relative from config.root) to the log file.',
116
- default: nil,
117
- type: String
118
- },
119
- :'logging.level' => {
120
- description: 'The log level.',
121
- default: 'INFO',
122
- type: String
123
- },
124
- :'logging.debug' => {
125
- description: 'Override debug logging.',
126
- default: nil,
127
- type: Boolean
128
- },
129
- :'logging.tty_level' => {
130
- description: 'Level to log when attached to a terminal (anything < logging.level will always be ignored).',
131
- default: 'DEBUG',
132
- type: String
133
- },
134
- :'connection.secure' => {
135
- description: 'Use SSL when sending data.',
136
- default: true,
137
- type: Boolean
138
- },
139
- :'connection.host' => {
140
- description: 'The host to use when sending data.',
141
- default: 'api.honeybadger.io'.freeze,
142
- type: String
143
- },
144
- :'connection.port' => {
145
- description: 'The port to use when sending data.',
146
- default: nil,
147
- type: Integer
148
- },
149
- :'connection.system_ssl_cert_chain' => {
150
- description: 'Use the system\'s SSL certificate chain (if available).',
151
- default: false,
152
- type: Boolean
153
- },
154
- :'connection.ssl_ca_bundle_path' => {
155
- description: 'Use this ca bundle when establishing secure connections.',
156
- default: nil,
157
- type: String
158
- },
159
- :'connection.http_open_timeout' => {
160
- description: 'The HTTP open timeout when connecting to the server.',
161
- default: 2,
162
- type: Integer
163
- },
164
- :'connection.http_read_timeout' => {
165
- description: 'The HTTP read timeout when connecting to the server.',
166
- default: 5,
167
- type: Integer
168
- },
169
- :'connection.proxy_host' => {
170
- description: 'The proxy host to use when sending data.',
171
- default: nil,
172
- type: String
173
- },
174
- :'connection.proxy_port' => {
175
- description: 'The proxy port to use when sending data.',
176
- default: nil,
177
- type: Integer
178
- },
179
- :'connection.proxy_user' => {
180
- description: 'The proxy user to use when sending data.',
181
- default: nil,
182
- type: String
183
- },
184
- :'connection.proxy_pass' => {
185
- description: 'The proxy password to use when sending data.',
186
- default: nil,
187
- type: String
188
- },
189
- :'request.filter_keys' => {
190
- description: 'A list of keys to filter when sending request data.',
191
- default: ['password'.freeze, 'password_confirmation'.freeze, 'HTTP_AUTHORIZATION'.freeze].freeze,
192
- type: Array
193
- },
194
- :'request.disable_session' => {
195
- description: 'Prevent session from being sent with request data.',
196
- default: false,
197
- type: Boolean
198
- },
199
- :'request.disable_params' => {
200
- description: 'Prevent params from being sent with request data.',
201
- default: false,
202
- type: Boolean
203
- },
204
- :'request.disable_environment' => {
205
- description: 'Prevent Rack environment from being sent with request data.',
206
- default: false,
207
- type: Boolean
208
- },
209
- :'request.disable_url' => {
210
- description: 'Prevent url from being sent with request data (Rack environment may still contain it in some cases).',
211
- default: false,
212
- type: Boolean
213
- },
214
- :'user_informer.enabled' => {
215
- description: 'Enable the UserInformer middleware.',
216
- default: true,
217
- type: Boolean
218
- },
219
- :'user_informer.info' => {
220
- description: 'Replacement string for HTML comment in templates.',
221
- default: 'Honeybadger Error {{error_id}}'.freeze,
222
- type: String
223
- },
224
- :'feedback.enabled' => {
225
- description: 'Enable the UserFeedback middleware.',
226
- default: true,
227
- type: Boolean
228
- },
229
- :'exceptions.enabled' => {
230
- description: 'Enable automatic reporting of exceptions.',
231
- default: true,
232
- type: Boolean
233
- },
234
- :'exceptions.ignore' => {
235
- description: 'A list of additional exceptions to ignore (includes default ignored exceptions).',
236
- default: IGNORE_DEFAULT,
237
- type: Array
238
- },
239
- :'exceptions.ignore_only' => {
240
- description: 'A list of exceptions to ignore (overrides the default ignored exceptions).',
241
- default: nil,
242
- type: Array
243
- },
244
- :'exceptions.ignored_user_agents' => {
245
- description: 'A list of user agents to ignore.',
246
- default: [].freeze,
247
- type: Array
248
- },
249
- :'exceptions.rescue_rake' => {
250
- description: 'Enable reporting exceptions in rake tasks.',
251
- default: !STDOUT.tty?,
252
- type: Boolean
253
- },
254
- :'exceptions.notify_at_exit' => {
255
- description: 'Report unhandled exception when Ruby crashes (at_exit).',
256
- default: true,
257
- type: Boolean
258
- },
259
- :'exceptions.source_radius' => {
260
- description: 'The number of lines before and after the source when reporting snippets.',
261
- default: 2,
262
- type: Integer
263
- },
264
- :'exceptions.local_variables' => {
265
- description: 'Enable sending local variables. Requires binding_of_caller to be loaded.',
266
- default: false,
267
- type: Boolean
268
- },
269
- :'exceptions.unwrap' => {
270
- description: 'Reports #original_exception or #cause one level up from rescued exception when available.',
271
- default: false,
272
- type: Boolean
273
- },
274
- :'delayed_job.attempt_threshold' => {
275
- description: 'The number of attempts before notifications will be sent.',
276
- default: 0,
277
- type: Integer
278
- },
279
- :'sidekiq.attempt_threshold' => {
280
- description: 'The number of attempts before notifications will be sent.',
281
- default: 0,
282
- type: Integer
283
- },
284
- :'shoryuken.attempt_threshold' => {
285
- description: 'The number of attempts before notifications will be sent.',
286
- default: 0,
287
- type: Integer
288
- },
289
- :'faktory.attempt_threshold' => {
290
- description: 'The number of attempts before notifications will be sent.',
291
- default: 0,
292
- type: Integer
293
- },
294
- :'sidekiq.use_component' => {
295
- description: 'Automatically set the component to the class of the job. Helps with grouping.',
296
- default: true,
297
- type: Boolean
298
- },
299
- :'sinatra.enabled' => {
300
- description: 'Enable Sinatra auto-initialization.',
301
- default: true,
302
- type: Boolean
303
- },
304
- :'rails.subscriber_ignore_sources' => {
305
- description: "Sources (strings or regexes) that should be ignored when using the Rails' (7+) native error reporter.",
306
- default: [],
307
- type: Array
308
- },
309
- :'resque.resque_retry.send_exceptions_when_retrying' => {
310
- description: 'Send exceptions when retrying job.',
311
- default: true,
312
- type: Boolean
313
- },
314
- :'breadcrumbs.enabled' => {
315
- description: 'Disable breadcrumb functionality.',
316
- default: true,
317
- type: Boolean
318
- },
319
- :'breadcrumbs.active_support_notifications' => {
320
- description: 'Configuration for automatic Active Support Instrumentation events.',
321
- default: Breadcrumbs::ActiveSupport.default_notifications,
322
- type: Hash
323
- },
324
- :'breadcrumbs.logging.enabled' => {
325
- description: 'Enable/Disable automatic breadcrumbs from log messages.',
326
- default: true,
327
- type: Boolean
328
- }
329
- }.freeze
330
-
331
- DEFAULTS = Hash[OPTIONS.map{|k,v| [k, v[:default]] }].freeze
332
- end
333
- end
1
+ require 'socket'
2
+ require 'honeybadger/breadcrumbs/active_support'
3
+
4
+ module Honeybadger
5
+ class Config
6
+ class Boolean; end
7
+
8
+ IGNORE_DEFAULT = ['ActionController::RoutingError',
9
+ 'AbstractController::ActionNotFound',
10
+ 'ActionController::MethodNotAllowed',
11
+ 'ActionController::UnknownHttpMethod',
12
+ 'ActionController::NotImplemented',
13
+ 'ActionController::UnknownFormat',
14
+ 'ActionController::InvalidAuthenticityToken',
15
+ 'ActionController::InvalidCrossOriginRequest',
16
+ # ActionDispatch::ParamsParser::ParseError was removed in Rails 6.0
17
+ # and may be removed here once support for Rails 5.2 is dropped.
18
+ # https://github.com/rails/rails/commit/e16c765ac6dcff068ff2e5554d69ff345c003de1
19
+ # https://github.com/honeybadger-io/honeybadger-ruby/pull/358
20
+ 'ActionDispatch::ParamsParser::ParseError',
21
+ 'ActionDispatch::Http::Parameters::ParseError',
22
+ 'ActionController::BadRequest',
23
+ 'ActionController::ParameterMissing',
24
+ 'ActiveRecord::RecordNotFound',
25
+ 'ActionController::UnknownAction',
26
+ 'ActionDispatch::Http::MimeNegotiation::InvalidType',
27
+ 'Rack::QueryParser::ParameterTypeError',
28
+ 'Rack::QueryParser::InvalidParameterError',
29
+ 'CGI::Session::CookieStore::TamperedWithCookie',
30
+ 'Mongoid::Errors::DocumentNotFound',
31
+ 'Sinatra::NotFound',
32
+ 'Sidekiq::JobRetry::Skip'].map(&:freeze).freeze
33
+
34
+ DEVELOPMENT_ENVIRONMENTS = ['development', 'test', 'cucumber'].map(&:freeze).freeze
35
+
36
+ DEFAULT_PATHS = ['honeybadger.yml', 'config/honeybadger.yml', "#{ENV['HOME']}/honeybadger.yml"].map(&:freeze).freeze
37
+
38
+ OPTIONS = {
39
+ api_key: {
40
+ description: 'The API key for your Honeybadger project.',
41
+ default: nil,
42
+ type: String
43
+ },
44
+ env: {
45
+ description: 'The current application\'s environment name.',
46
+ default: nil,
47
+ type: String
48
+ },
49
+ report_data: {
50
+ description: 'Enable/disable reporting of data. Defaults to true for non-development environments.',
51
+ default: nil,
52
+ type: Boolean
53
+ },
54
+ root: {
55
+ description: 'The project\'s absolute root path.',
56
+ default: Dir.pwd,
57
+ type: String
58
+ },
59
+ revision: {
60
+ description: 'The git revision of the project.',
61
+ default: nil,
62
+ type: String
63
+ },
64
+ hostname: {
65
+ description: 'The hostname of the current box.',
66
+ default: Socket.gethostname,
67
+ type: String
68
+ },
69
+ backend: {
70
+ description: 'An alternate backend to use for reporting data.',
71
+ default: nil,
72
+ type: String
73
+ },
74
+ debug: {
75
+ description: 'Enables debug logging.',
76
+ default: false,
77
+ type: Boolean
78
+ },
79
+ development_environments: {
80
+ description: 'Environments which will not report data by default (use report_data to enable/disable explicitly).',
81
+ default: DEVELOPMENT_ENVIRONMENTS,
82
+ type: Array
83
+ },
84
+ :'send_data_at_exit' => {
85
+ description: 'Send remaining data when Ruby exits.',
86
+ default: true,
87
+ type: Boolean
88
+ },
89
+ max_queue_size: {
90
+ description: 'Maximum number of items for each worker queue.',
91
+ default: 100,
92
+ type: Integer
93
+ },
94
+ plugins: {
95
+ description: 'An optional list of plugins to load. Default is to load all plugins.',
96
+ default: nil,
97
+ type: Array
98
+ },
99
+ sync: {
100
+ description: 'Enable all notices to be sent synchronously. Default is false.',
101
+ default: false,
102
+ type: Boolean
103
+ },
104
+ :'skipped_plugins' => {
105
+ description: 'An optional list of plugins to skip.',
106
+ default: nil,
107
+ type: Array
108
+ },
109
+ :'config.path' => {
110
+ description: 'The path (absolute, or relative from config.root) to the project\'s YAML configuration file.',
111
+ default: DEFAULT_PATHS,
112
+ type: String
113
+ },
114
+ :'logging.path' => {
115
+ description: 'The path (absolute, or relative from config.root) to the log file.',
116
+ default: nil,
117
+ type: String
118
+ },
119
+ :'logging.level' => {
120
+ description: 'The log level.',
121
+ default: 'INFO',
122
+ type: String
123
+ },
124
+ :'logging.debug' => {
125
+ description: 'Override debug logging.',
126
+ default: nil,
127
+ type: Boolean
128
+ },
129
+ :'logging.tty_level' => {
130
+ description: 'Level to log when attached to a terminal (anything < logging.level will always be ignored).',
131
+ default: 'DEBUG',
132
+ type: String
133
+ },
134
+ :'connection.secure' => {
135
+ description: 'Use SSL when sending data.',
136
+ default: true,
137
+ type: Boolean
138
+ },
139
+ :'connection.host' => {
140
+ description: 'The host to use when sending data.',
141
+ default: 'api.honeybadger.io'.freeze,
142
+ type: String
143
+ },
144
+ :'connection.port' => {
145
+ description: 'The port to use when sending data.',
146
+ default: nil,
147
+ type: Integer
148
+ },
149
+ :'connection.system_ssl_cert_chain' => {
150
+ description: 'Use the system\'s SSL certificate chain (if available).',
151
+ default: false,
152
+ type: Boolean
153
+ },
154
+ :'connection.ssl_ca_bundle_path' => {
155
+ description: 'Use this ca bundle when establishing secure connections.',
156
+ default: nil,
157
+ type: String
158
+ },
159
+ :'connection.http_open_timeout' => {
160
+ description: 'The HTTP open timeout when connecting to the server.',
161
+ default: 2,
162
+ type: Integer
163
+ },
164
+ :'connection.http_read_timeout' => {
165
+ description: 'The HTTP read timeout when connecting to the server.',
166
+ default: 5,
167
+ type: Integer
168
+ },
169
+ :'connection.proxy_host' => {
170
+ description: 'The proxy host to use when sending data.',
171
+ default: nil,
172
+ type: String
173
+ },
174
+ :'connection.proxy_port' => {
175
+ description: 'The proxy port to use when sending data.',
176
+ default: nil,
177
+ type: Integer
178
+ },
179
+ :'connection.proxy_user' => {
180
+ description: 'The proxy user to use when sending data.',
181
+ default: nil,
182
+ type: String
183
+ },
184
+ :'connection.proxy_pass' => {
185
+ description: 'The proxy password to use when sending data.',
186
+ default: nil,
187
+ type: String
188
+ },
189
+ :'request.filter_keys' => {
190
+ description: 'A list of keys to filter when sending request data.',
191
+ default: ['password'.freeze, 'password_confirmation'.freeze, 'HTTP_AUTHORIZATION'.freeze].freeze,
192
+ type: Array
193
+ },
194
+ :'request.disable_session' => {
195
+ description: 'Prevent session from being sent with request data.',
196
+ default: false,
197
+ type: Boolean
198
+ },
199
+ :'request.disable_params' => {
200
+ description: 'Prevent params from being sent with request data.',
201
+ default: false,
202
+ type: Boolean
203
+ },
204
+ :'request.disable_environment' => {
205
+ description: 'Prevent Rack environment from being sent with request data.',
206
+ default: false,
207
+ type: Boolean
208
+ },
209
+ :'request.disable_url' => {
210
+ description: 'Prevent url from being sent with request data (Rack environment may still contain it in some cases).',
211
+ default: false,
212
+ type: Boolean
213
+ },
214
+ :'user_informer.enabled' => {
215
+ description: 'Enable the UserInformer middleware.',
216
+ default: true,
217
+ type: Boolean
218
+ },
219
+ :'user_informer.info' => {
220
+ description: 'Replacement string for HTML comment in templates.',
221
+ default: 'Honeybadger Error {{error_id}}'.freeze,
222
+ type: String
223
+ },
224
+ :'feedback.enabled' => {
225
+ description: 'Enable the UserFeedback middleware.',
226
+ default: true,
227
+ type: Boolean
228
+ },
229
+ :'exceptions.enabled' => {
230
+ description: 'Enable automatic reporting of exceptions.',
231
+ default: true,
232
+ type: Boolean
233
+ },
234
+ :'exceptions.ignore' => {
235
+ description: 'A list of additional exceptions to ignore (includes default ignored exceptions).',
236
+ default: IGNORE_DEFAULT,
237
+ type: Array
238
+ },
239
+ :'exceptions.ignore_only' => {
240
+ description: 'A list of exceptions to ignore (overrides the default ignored exceptions).',
241
+ default: nil,
242
+ type: Array
243
+ },
244
+ :'exceptions.ignored_user_agents' => {
245
+ description: 'A list of user agents to ignore.',
246
+ default: [].freeze,
247
+ type: Array
248
+ },
249
+ :'exceptions.rescue_rake' => {
250
+ description: 'Enable reporting exceptions in rake tasks.',
251
+ default: !STDOUT.tty?,
252
+ type: Boolean
253
+ },
254
+ :'exceptions.notify_at_exit' => {
255
+ description: 'Report unhandled exception when Ruby crashes (at_exit).',
256
+ default: true,
257
+ type: Boolean
258
+ },
259
+ :'exceptions.source_radius' => {
260
+ description: 'The number of lines before and after the source when reporting snippets.',
261
+ default: 2,
262
+ type: Integer
263
+ },
264
+ :'exceptions.local_variables' => {
265
+ description: 'Enable sending local variables. Requires binding_of_caller to be loaded.',
266
+ default: false,
267
+ type: Boolean
268
+ },
269
+ :'exceptions.unwrap' => {
270
+ description: 'Reports #original_exception or #cause one level up from rescued exception when available.',
271
+ default: false,
272
+ type: Boolean
273
+ },
274
+ :'delayed_job.attempt_threshold' => {
275
+ description: 'The number of attempts before notifications will be sent.',
276
+ default: 0,
277
+ type: Integer
278
+ },
279
+ :'sidekiq.attempt_threshold' => {
280
+ description: 'The number of attempts before notifications will be sent.',
281
+ default: 0,
282
+ type: Integer
283
+ },
284
+ :'shoryuken.attempt_threshold' => {
285
+ description: 'The number of attempts before notifications will be sent.',
286
+ default: 0,
287
+ type: Integer
288
+ },
289
+ :'faktory.attempt_threshold' => {
290
+ description: 'The number of attempts before notifications will be sent.',
291
+ default: 0,
292
+ type: Integer
293
+ },
294
+ :'sidekiq.use_component' => {
295
+ description: 'Automatically set the component to the class of the job. Helps with grouping.',
296
+ default: true,
297
+ type: Boolean
298
+ },
299
+ :'sinatra.enabled' => {
300
+ description: 'Enable Sinatra auto-initialization.',
301
+ default: true,
302
+ type: Boolean
303
+ },
304
+ :'rails.subscriber_ignore_sources' => {
305
+ description: "Sources (strings or regexes) that should be ignored when using the Rails' (7+) native error reporter (handled exceptions only).",
306
+ # External libraries (eg Sidekiq, Resque) may wrap their execution in Rails' executor.
307
+ # But this means errors will first be reported by Rails.error, before the library's native error handler
308
+ # We ignore these reports, since the native error handler provides more context (such as job details)
309
+ default: ['application.active_support'],
310
+ type: Array
311
+ },
312
+ :'resque.resque_retry.send_exceptions_when_retrying' => {
313
+ description: 'Send exceptions when retrying job.',
314
+ default: true,
315
+ type: Boolean
316
+ },
317
+ :'breadcrumbs.enabled' => {
318
+ description: 'Disable breadcrumb functionality.',
319
+ default: true,
320
+ type: Boolean
321
+ },
322
+ :'breadcrumbs.active_support_notifications' => {
323
+ description: 'Configuration for automatic Active Support Instrumentation events.',
324
+ default: Breadcrumbs::ActiveSupport.default_notifications,
325
+ type: Hash
326
+ },
327
+ :'breadcrumbs.logging.enabled' => {
328
+ description: 'Enable/Disable automatic breadcrumbs from log messages.',
329
+ default: true,
330
+ type: Boolean
331
+ }
332
+ }.freeze
333
+
334
+ DEFAULTS = Hash[OPTIONS.map{|k,v| [k, v[:default]] }].freeze
335
+ end
336
+ end