honeybadger 4.12.2 → 5.1.0

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