honeybadger 5.29.1 → 6.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +69 -0
  3. data/lib/honeybadger/agent.rb +36 -35
  4. data/lib/honeybadger/backend/base.rb +11 -11
  5. data/lib/honeybadger/backend/debug.rb +4 -4
  6. data/lib/honeybadger/backend/null.rb +2 -2
  7. data/lib/honeybadger/backend/server.rb +11 -11
  8. data/lib/honeybadger/backend/test.rb +2 -2
  9. data/lib/honeybadger/backend.rb +6 -6
  10. data/lib/honeybadger/backtrace.rb +27 -22
  11. data/lib/honeybadger/breadcrumbs/active_support.rb +9 -9
  12. data/lib/honeybadger/breadcrumbs/breadcrumb.rb +1 -2
  13. data/lib/honeybadger/breadcrumbs/collector.rb +4 -4
  14. data/lib/honeybadger/breadcrumbs/logging.rb +11 -14
  15. data/lib/honeybadger/breadcrumbs.rb +3 -3
  16. data/lib/honeybadger/cli/deploy.rb +7 -7
  17. data/lib/honeybadger/cli/exec.rb +41 -41
  18. data/lib/honeybadger/cli/helpers.rb +18 -18
  19. data/lib/honeybadger/cli/heroku.rb +36 -36
  20. data/lib/honeybadger/cli/install.rb +44 -44
  21. data/lib/honeybadger/cli/main.rb +107 -107
  22. data/lib/honeybadger/cli/notify.rb +13 -13
  23. data/lib/honeybadger/cli/test.rb +109 -94
  24. data/lib/honeybadger/cli.rb +3 -3
  25. data/lib/honeybadger/config/defaults.rb +224 -218
  26. data/lib/honeybadger/config/env.rb +5 -5
  27. data/lib/honeybadger/config/ruby.rb +19 -19
  28. data/lib/honeybadger/config/yaml.rb +12 -12
  29. data/lib/honeybadger/config.rb +76 -78
  30. data/lib/honeybadger/const.rb +4 -4
  31. data/lib/honeybadger/context_manager.rb +16 -16
  32. data/lib/honeybadger/conversions.rb +9 -6
  33. data/lib/honeybadger/counter.rb +4 -4
  34. data/lib/honeybadger/event.rb +3 -3
  35. data/lib/honeybadger/events_worker.rb +34 -33
  36. data/lib/honeybadger/gauge.rb +2 -2
  37. data/lib/honeybadger/histogram.rb +4 -4
  38. data/lib/honeybadger/init/hanami.rb +5 -5
  39. data/lib/honeybadger/init/rails.rb +14 -14
  40. data/lib/honeybadger/init/rake.rb +19 -21
  41. data/lib/honeybadger/init/ruby.rb +4 -4
  42. data/lib/honeybadger/init/sinatra.rb +11 -12
  43. data/lib/honeybadger/instrumentation.rb +26 -31
  44. data/lib/honeybadger/instrumentation_helper.rb +11 -12
  45. data/lib/honeybadger/karafka.rb +55 -56
  46. data/lib/honeybadger/logging.rb +22 -21
  47. data/lib/honeybadger/metric.rb +2 -2
  48. data/lib/honeybadger/metrics_worker.rb +12 -10
  49. data/lib/honeybadger/notice.rb +55 -58
  50. data/lib/honeybadger/notification_subscriber.rb +32 -19
  51. data/lib/honeybadger/plugin.rb +16 -18
  52. data/lib/honeybadger/plugins/active_job.rb +11 -9
  53. data/lib/honeybadger/plugins/autotuner.rb +5 -5
  54. data/lib/honeybadger/plugins/breadcrumbs.rb +7 -7
  55. data/lib/honeybadger/plugins/delayed_job/plugin.rb +36 -37
  56. data/lib/honeybadger/plugins/delayed_job.rb +4 -4
  57. data/lib/honeybadger/plugins/faktory.rb +10 -10
  58. data/lib/honeybadger/plugins/karafka.rb +3 -3
  59. data/lib/honeybadger/plugins/lambda.rb +9 -11
  60. data/lib/honeybadger/plugins/local_variables.rb +4 -4
  61. data/lib/honeybadger/plugins/net_http.rb +10 -10
  62. data/lib/honeybadger/plugins/passenger.rb +4 -4
  63. data/lib/honeybadger/plugins/rails.rb +13 -9
  64. data/lib/honeybadger/plugins/resque.rb +7 -7
  65. data/lib/honeybadger/plugins/shoryuken.rb +6 -6
  66. data/lib/honeybadger/plugins/sidekiq.rb +74 -60
  67. data/lib/honeybadger/plugins/solid_queue.rb +3 -3
  68. data/lib/honeybadger/plugins/sucker_punch.rb +5 -5
  69. data/lib/honeybadger/plugins/system.rb +3 -3
  70. data/lib/honeybadger/plugins/thor.rb +5 -5
  71. data/lib/honeybadger/plugins/warden.rb +4 -4
  72. data/lib/honeybadger/rack/error_notifier.rb +14 -14
  73. data/lib/honeybadger/rack/user_feedback.rb +11 -12
  74. data/lib/honeybadger/rack/user_informer.rb +6 -6
  75. data/lib/honeybadger/registry.rb +2 -2
  76. data/lib/honeybadger/registry_execution.rb +1 -1
  77. data/lib/honeybadger/ruby.rb +2 -2
  78. data/lib/honeybadger/singleton.rb +49 -48
  79. data/lib/honeybadger/tasks.rb +3 -3
  80. data/lib/honeybadger/timer.rb +1 -1
  81. data/lib/honeybadger/util/http.rb +27 -27
  82. data/lib/honeybadger/util/request_hash.rb +11 -11
  83. data/lib/honeybadger/util/request_payload.rb +2 -2
  84. data/lib/honeybadger/util/revision.rb +14 -6
  85. data/lib/honeybadger/util/sanitizer.rb +22 -22
  86. data/lib/honeybadger/util/stats.rb +6 -3
  87. data/lib/honeybadger/version.rb +1 -1
  88. data/lib/honeybadger/worker.rb +31 -29
  89. data/lib/honeybadger.rb +5 -5
  90. data/lib/puma/plugin/honeybadger.rb +12 -8
  91. metadata +3 -3
@@ -1,529 +1,535 @@
1
- require 'socket'
2
- require 'honeybadger/breadcrumbs/active_support'
1
+ require "socket"
2
+ require "honeybadger/breadcrumbs/active_support"
3
3
 
4
4
  module Honeybadger
5
5
  class Config
6
6
  class Boolean; end
7
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
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
33
 
34
34
  IGNORE_EVENTS_DEFAULT = [
35
- { event_type: 'metric.hb', metric_name: 'duration.sql.active_record', query: /^(begin|commit)( immediate)?( transaction)?$/i },
36
- { event_type: 'sql.active_record', query: /^(begin|commit)( immediate)?( transaction)?$/i },
37
- { event_type: 'sql.active_record', query: /(solid_queue|good_job)/i },
38
- { event_type: 'sql.active_record', name: /^GoodJob/ },
39
- { event_type: 'process_action.action_controller', controller: 'Rails::HealthController' }
35
+ {event_type: "metric.hb", metric_name: "duration.sql.active_record", query: /^(begin|commit)( immediate)?( transaction)?$/i},
36
+ {event_type: "sql.active_record", query: /^(begin|commit)( immediate)?( transaction)?$/i},
37
+ {event_type: "sql.active_record", query: /(solid_queue|good_job)/i},
38
+ {event_type: "sql.active_record", name: /^GoodJob/},
39
+ {event_type: "process_action.action_controller", controller: "Rails::HealthController"},
40
+ {event_type: "cache_exist?.active_support"},
41
+ {event_type: "cache_write.active_support"},
42
+ {event_type: "cache_generate.active_support"},
43
+ {event_type: "cache_delete.active_support"},
44
+ {event_type: "cache_increment.active_support"},
45
+ {event_type: "cache_decrement.active_support"}
40
46
  ].freeze
41
47
 
42
- DEVELOPMENT_ENVIRONMENTS = ['development', 'test', 'cucumber'].map(&:freeze).freeze
48
+ DEVELOPMENT_ENVIRONMENTS = ["development", "test", "cucumber"].map(&:freeze).freeze
43
49
 
44
- DEFAULT_PATHS = ['honeybadger.yml', 'config/honeybadger.yml', "#{ENV['HOME']}/honeybadger.yml"].map(&:freeze).freeze
50
+ DEFAULT_PATHS = ["honeybadger.yml", "config/honeybadger.yml", "#{ENV["HOME"]}/honeybadger.yml"].map(&:freeze).freeze
45
51
 
46
52
  OPTIONS = {
47
53
  api_key: {
48
- description: 'The API key for your Honeybadger project.',
54
+ description: "The API key for your Honeybadger project.",
49
55
  default: nil,
50
56
  type: String
51
57
  },
52
58
  env: {
53
- description: 'The current application\'s environment name.',
59
+ description: "The current application's environment name.",
54
60
  default: nil,
55
61
  type: String
56
62
  },
57
63
  report_data: {
58
- description: 'Enable/disable reporting of data. Defaults to true for non-development environments.',
64
+ description: "Enable/disable reporting of data. Defaults to true for non-development environments.",
59
65
  default: nil,
60
66
  type: Boolean
61
67
  },
62
68
  root: {
63
- description: 'The project\'s absolute root path.',
69
+ description: "The project's absolute root path.",
64
70
  default: Dir.pwd,
65
71
  type: String
66
72
  },
67
73
  revision: {
68
- description: 'The git revision of the project.',
74
+ description: "The git revision of the project.",
69
75
  default: nil,
70
76
  type: String
71
77
  },
72
78
  hostname: {
73
- description: 'The hostname of the current box.',
79
+ description: "The hostname of the current box.",
74
80
  default: Socket.gethostname,
75
81
  type: String
76
82
  },
77
83
  backend: {
78
- description: 'An alternate backend to use for reporting data.',
84
+ description: "An alternate backend to use for reporting data.",
79
85
  default: nil,
80
86
  type: String
81
87
  },
82
88
  debug: {
83
- description: 'Enables debug logging.',
89
+ description: "Enables debug logging.",
84
90
  default: false,
85
91
  type: Boolean
86
92
  },
87
93
  development_environments: {
88
- description: 'Environments which will not report data by default (use report_data to enable/disable explicitly).',
94
+ description: "Environments which will not report data by default (use report_data to enable/disable explicitly).",
89
95
  default: DEVELOPMENT_ENVIRONMENTS,
90
96
  type: Array
91
97
  },
92
- :'send_data_at_exit' => {
93
- description: 'Send remaining data when Ruby exits.',
98
+ send_data_at_exit: {
99
+ description: "Send remaining data when Ruby exits.",
94
100
  default: true,
95
101
  type: Boolean
96
102
  },
97
103
  max_queue_size: {
98
- description: 'Maximum number of items for each worker queue.',
104
+ description: "Maximum number of items for each worker queue.",
99
105
  default: 100,
100
106
  type: Integer
101
107
  },
102
- :'events.max_queue_size' => {
103
- description: 'Maximum number of event for the event worker queue.',
108
+ "events.max_queue_size": {
109
+ description: "Maximum number of event for the event worker queue.",
104
110
  default: 100000,
105
111
  type: Integer
106
112
  },
107
- :'events.batch_size' => {
108
- description: 'Send events batch if n events have accumulated',
113
+ "events.batch_size": {
114
+ description: "Send events batch if n events have accumulated",
109
115
  default: 1000,
110
116
  type: Integer
111
117
  },
112
- :'events.timeout' => {
113
- description: 'Timeout after which the events batch will be sent regardless (in milliseconds)',
118
+ "events.timeout": {
119
+ description: "Timeout after which the events batch will be sent regardless (in milliseconds)",
114
120
  default: 30_000,
115
121
  type: Integer
116
122
  },
117
- :'events.attach_hostname' => {
118
- description: 'Add the hostname to all event paylaods.',
123
+ "events.attach_hostname": {
124
+ description: "Add the hostname to all event paylaods.",
119
125
  default: true,
120
126
  type: Boolean
121
127
  },
122
- :'events.ignore' => {
123
- description: 'A list of additional events to ignore. Use a hash to query nested payloads, match using a string or regex. Non-hash will match on the event_type.',
128
+ "events.ignore": {
129
+ description: "A list of additional events to ignore. Use a hash to query nested payloads, match using a string or regex. Non-hash will match on the event_type.",
124
130
  default: IGNORE_EVENTS_DEFAULT,
125
131
  type: Array
126
132
  },
127
- :'events.ignore_only' => {
128
- description: 'A list of events to ignore (overrides the default ignored events).',
133
+ "events.ignore_only": {
134
+ description: "A list of events to ignore (overrides the default ignored events).",
129
135
  default: nil,
130
136
  type: Array
131
137
  },
132
- :'events.sample_rate' => {
133
- description: 'Percentage of events to send to the API (0-100). A value of 0 means no events are sent, 100 means all events are sent.',
138
+ "events.sample_rate": {
139
+ description: "Percentage of events to send to the API (0-100). A value of 0 means no events are sent, 100 means all events are sent.",
134
140
  default: 100,
135
141
  type: Integer
136
142
  },
137
143
  plugins: {
138
- description: 'An optional list of plugins to load. Default is to load all plugins.',
144
+ description: "An optional list of plugins to load. Default is to load all plugins.",
139
145
  default: nil,
140
146
  type: Array
141
147
  },
142
148
  sync: {
143
- description: 'Enable all notices to be sent synchronously. Default is false.',
149
+ description: "Enable all notices to be sent synchronously. Default is false.",
144
150
  default: false,
145
151
  type: Boolean
146
152
  },
147
- :'skipped_plugins' => {
148
- description: 'An optional list of plugins to skip.',
153
+ skipped_plugins: {
154
+ description: "An optional list of plugins to skip.",
149
155
  default: nil,
150
156
  type: Array
151
157
  },
152
- :'config.path' => {
153
- description: 'The path (absolute, or relative from config.root) to the project\'s YAML configuration file.',
158
+ "config.path": {
159
+ description: "The path (absolute, or relative from config.root) to the project's YAML configuration file.",
154
160
  default: DEFAULT_PATHS,
155
161
  type: String
156
162
  },
157
- :'logging.path' => {
158
- description: 'The path (absolute, or relative from config.root) to the log file.',
163
+ "logging.path": {
164
+ description: "The path (absolute, or relative from config.root) to the log file.",
159
165
  default: nil,
160
166
  type: String
161
167
  },
162
- :'logging.level' => {
163
- description: 'The log level.',
164
- default: 'INFO',
168
+ "logging.level": {
169
+ description: "The log level.",
170
+ default: "INFO",
165
171
  type: String
166
172
  },
167
- :'logging.debug' => {
168
- description: 'Override debug logging.',
173
+ "logging.debug": {
174
+ description: "Override debug logging.",
169
175
  default: nil,
170
176
  type: Boolean
171
177
  },
172
- :'logging.tty_level' => {
173
- description: 'Level to log when attached to a terminal (anything < logging.level will always be ignored).',
174
- default: 'DEBUG',
178
+ "logging.tty_level": {
179
+ description: "Level to log when attached to a terminal (anything < logging.level will always be ignored).",
180
+ default: "DEBUG",
175
181
  type: String
176
182
  },
177
- :'connection.secure' => {
178
- description: 'Use SSL when sending data.',
183
+ "connection.secure": {
184
+ description: "Use SSL when sending data.",
179
185
  default: true,
180
186
  type: Boolean
181
187
  },
182
- :'connection.host' => {
183
- description: 'The host to use when sending data.',
184
- default: 'api.honeybadger.io'.freeze,
188
+ "connection.host": {
189
+ description: "The host to use when sending data.",
190
+ default: "api.honeybadger.io".freeze,
185
191
  type: String
186
192
  },
187
- :'connection.ui_host' => {
188
- description: 'The host to use when viewing data.',
189
- default: 'app.honeybadger.io'.freeze,
193
+ "connection.ui_host": {
194
+ description: "The host to use when viewing data.",
195
+ default: "app.honeybadger.io".freeze,
190
196
  type: String
191
197
  },
192
- :'connection.port' => {
193
- description: 'The port to use when sending data.',
198
+ "connection.port": {
199
+ description: "The port to use when sending data.",
194
200
  default: nil,
195
201
  type: Integer
196
202
  },
197
- :'connection.system_ssl_cert_chain' => {
198
- description: 'Use the system\'s SSL certificate chain (if available).',
203
+ "connection.system_ssl_cert_chain": {
204
+ description: "Use the system's SSL certificate chain (if available).",
199
205
  default: false,
200
206
  type: Boolean
201
207
  },
202
- :'connection.ssl_ca_bundle_path' => {
203
- description: 'Use this ca bundle when establishing secure connections.',
208
+ "connection.ssl_ca_bundle_path": {
209
+ description: "Use this ca bundle when establishing secure connections.",
204
210
  default: nil,
205
211
  type: String
206
212
  },
207
- :'connection.http_open_timeout' => {
208
- description: 'The HTTP open timeout when connecting to the server.',
213
+ "connection.http_open_timeout": {
214
+ description: "The HTTP open timeout when connecting to the server.",
209
215
  default: 2,
210
216
  type: Integer
211
217
  },
212
- :'connection.http_read_timeout' => {
213
- description: 'The HTTP read timeout when connecting to the server.',
218
+ "connection.http_read_timeout": {
219
+ description: "The HTTP read timeout when connecting to the server.",
214
220
  default: 5,
215
221
  type: Integer
216
222
  },
217
- :'connection.proxy_host' => {
218
- description: 'The proxy host to use when sending data.',
223
+ "connection.proxy_host": {
224
+ description: "The proxy host to use when sending data.",
219
225
  default: nil,
220
226
  type: String
221
227
  },
222
- :'connection.proxy_port' => {
223
- description: 'The proxy port to use when sending data.',
228
+ "connection.proxy_port": {
229
+ description: "The proxy port to use when sending data.",
224
230
  default: nil,
225
231
  type: Integer
226
232
  },
227
- :'connection.proxy_user' => {
228
- description: 'The proxy user to use when sending data.',
233
+ "connection.proxy_user": {
234
+ description: "The proxy user to use when sending data.",
229
235
  default: nil,
230
236
  type: String
231
237
  },
232
- :'connection.proxy_pass' => {
233
- description: 'The proxy password to use when sending data.',
238
+ "connection.proxy_pass": {
239
+ description: "The proxy password to use when sending data.",
234
240
  default: nil,
235
241
  type: String
236
242
  },
237
- :'request.filter_keys' => {
238
- description: 'A list of keys to filter when sending request data.',
239
- default: ['password'.freeze, 'password_confirmation'.freeze, 'HTTP_AUTHORIZATION'.freeze].freeze,
243
+ "request.filter_keys": {
244
+ description: "A list of keys to filter when sending request data.",
245
+ default: ["password".freeze, "password_confirmation".freeze, "HTTP_AUTHORIZATION".freeze].freeze,
240
246
  type: Array
241
247
  },
242
- :'request.disable_session' => {
243
- description: 'Prevent session from being sent with request data.',
248
+ "request.disable_session": {
249
+ description: "Prevent session from being sent with request data.",
244
250
  default: false,
245
251
  type: Boolean
246
252
  },
247
- :'request.disable_params' => {
248
- description: 'Prevent params from being sent with request data.',
253
+ "request.disable_params": {
254
+ description: "Prevent params from being sent with request data.",
249
255
  default: false,
250
256
  type: Boolean
251
257
  },
252
- :'request.disable_environment' => {
253
- description: 'Prevent Rack environment from being sent with request data.',
258
+ "request.disable_environment": {
259
+ description: "Prevent Rack environment from being sent with request data.",
254
260
  default: false,
255
261
  type: Boolean
256
262
  },
257
- :'request.disable_url' => {
258
- description: 'Prevent url from being sent with request data (Rack environment may still contain it in some cases).',
263
+ "request.disable_url": {
264
+ description: "Prevent url from being sent with request data (Rack environment may still contain it in some cases).",
259
265
  default: false,
260
266
  type: Boolean
261
267
  },
262
- :'user_informer.enabled' => {
263
- description: 'Enable the UserInformer middleware.',
268
+ "user_informer.enabled": {
269
+ description: "Enable the UserInformer middleware.",
264
270
  default: true,
265
271
  type: Boolean
266
272
  },
267
- :'user_informer.info' => {
268
- description: 'Replacement string for HTML comment in templates.',
269
- default: 'Honeybadger Error {{error_id}}'.freeze,
273
+ "user_informer.info": {
274
+ description: "Replacement string for HTML comment in templates.",
275
+ default: "Honeybadger Error {{error_id}}".freeze,
270
276
  type: String
271
277
  },
272
- :'feedback.enabled' => {
273
- description: 'Enable the UserFeedback middleware.',
278
+ "feedback.enabled": {
279
+ description: "Enable the UserFeedback middleware.",
274
280
  default: true,
275
281
  type: Boolean
276
282
  },
277
- :'exceptions.enabled' => {
278
- description: 'Enable automatic reporting of exceptions.',
283
+ "exceptions.enabled": {
284
+ description: "Enable automatic reporting of exceptions.",
279
285
  default: true,
280
286
  type: Boolean
281
287
  },
282
- :'exceptions.ignore' => {
283
- description: 'A list of additional exceptions to ignore (includes default ignored exceptions).',
288
+ "exceptions.ignore": {
289
+ description: "A list of additional exceptions to ignore (includes default ignored exceptions).",
284
290
  default: IGNORE_DEFAULT,
285
291
  type: Array
286
292
  },
287
- :'exceptions.ignore_only' => {
288
- description: 'A list of exceptions to ignore (overrides the default ignored exceptions).',
293
+ "exceptions.ignore_only": {
294
+ description: "A list of exceptions to ignore (overrides the default ignored exceptions).",
289
295
  default: nil,
290
296
  type: Array
291
297
  },
292
- :'exceptions.ignored_user_agents' => {
293
- description: 'A list of user agents to ignore.',
298
+ "exceptions.ignored_user_agents": {
299
+ description: "A list of user agents to ignore.",
294
300
  default: [].freeze,
295
301
  type: Array
296
302
  },
297
- :'exceptions.rescue_rake' => {
298
- description: 'Enable reporting exceptions in rake tasks.',
299
- default: !STDOUT.tty?,
303
+ "exceptions.rescue_rake": {
304
+ description: "Enable reporting exceptions in rake tasks.",
305
+ default: !$stdout.tty?,
300
306
  type: Boolean
301
307
  },
302
- :'exceptions.notify_at_exit' => {
303
- description: 'Report unhandled exception when Ruby crashes (at_exit).',
308
+ "exceptions.notify_at_exit": {
309
+ description: "Report unhandled exception when Ruby crashes (at_exit).",
304
310
  default: true,
305
311
  type: Boolean
306
312
  },
307
- :'exceptions.source_radius' => {
308
- description: 'The number of lines before and after the source when reporting snippets.',
313
+ "exceptions.source_radius": {
314
+ description: "The number of lines before and after the source when reporting snippets.",
309
315
  default: 2,
310
316
  type: Integer
311
317
  },
312
- :'exceptions.local_variables' => {
313
- description: 'Enable sending local variables. Requires binding_of_caller to be loaded.',
318
+ "exceptions.local_variables": {
319
+ description: "Enable sending local variables. Requires binding_of_caller to be loaded.",
314
320
  default: false,
315
321
  type: Boolean
316
322
  },
317
- :'exceptions.unwrap' => {
318
- description: 'Reports #original_exception or #cause one level up from rescued exception when available.',
323
+ "exceptions.unwrap": {
324
+ description: "Reports #original_exception or #cause one level up from rescued exception when available.",
319
325
  default: false,
320
326
  type: Boolean
321
327
  },
322
- :'active_job.attempt_threshold' => {
323
- description: 'The number of attempts before notifications will be sent.',
328
+ "active_job.attempt_threshold": {
329
+ description: "The number of attempts before notifications will be sent.",
324
330
  default: 0,
325
331
  type: Integer
326
332
  },
327
- :'delayed_job.attempt_threshold' => {
328
- description: 'The number of attempts before notifications will be sent.',
333
+ "delayed_job.attempt_threshold": {
334
+ description: "The number of attempts before notifications will be sent.",
329
335
  default: 0,
330
336
  type: Integer
331
337
  },
332
- :'sidekiq.attempt_threshold' => {
333
- description: 'The number of attempts before notifications will be sent.',
338
+ "sidekiq.attempt_threshold": {
339
+ description: "The number of attempts before notifications will be sent.",
334
340
  default: 0,
335
341
  type: Integer
336
342
  },
337
- :'shoryuken.attempt_threshold' => {
338
- description: 'The number of attempts before notifications will be sent.',
343
+ "shoryuken.attempt_threshold": {
344
+ description: "The number of attempts before notifications will be sent.",
339
345
  default: 0,
340
346
  type: Integer
341
347
  },
342
- :'faktory.attempt_threshold' => {
343
- description: 'The number of attempts before notifications will be sent.',
348
+ "faktory.attempt_threshold": {
349
+ description: "The number of attempts before notifications will be sent.",
344
350
  default: 0,
345
351
  type: Integer
346
352
  },
347
- :'sidekiq.use_component' => {
348
- description: 'Automatically set the component to the class of the job. Helps with grouping.',
353
+ "sidekiq.use_component": {
354
+ description: "Automatically set the component to the class of the job. Helps with grouping.",
349
355
  default: true,
350
356
  type: Boolean
351
357
  },
352
- :'sidekiq.insights.enabled' => {
353
- description: 'Enable automatic data collection for Sidekiq.',
358
+ "sidekiq.insights.enabled": {
359
+ description: "Enable automatic data collection for Sidekiq.",
354
360
  default: true,
355
361
  type: Boolean
356
362
  },
357
- :'sidekiq.insights.events' => {
358
- description: 'Enable automatic event capturing for Sidekiq.',
363
+ "sidekiq.insights.events": {
364
+ description: "Enable automatic event capturing for Sidekiq.",
359
365
  default: true,
360
366
  type: Boolean
361
367
  },
362
- :'sidekiq.insights.metrics' => {
363
- description: 'Enable automatic metric data collection for Sidekiq.',
368
+ "sidekiq.insights.metrics": {
369
+ description: "Enable automatic metric data collection for Sidekiq.",
364
370
  default: false,
365
371
  type: Boolean
366
372
  },
367
- :'sidekiq.insights.cluster_collection' => {
368
- description: 'Collect cluster based metrics for Sidekiq.',
373
+ "sidekiq.insights.cluster_collection": {
374
+ description: "Collect cluster based metrics for Sidekiq.",
369
375
  default: true,
370
376
  type: Boolean
371
377
  },
372
- :'sidekiq.insights.collection_interval' => {
373
- description: 'The frequency in which Sidekiq cluster metrics are sampled.',
378
+ "sidekiq.insights.collection_interval": {
379
+ description: "The frequency in which Sidekiq cluster metrics are sampled.",
374
380
  default: 5,
375
381
  type: Integer
376
382
  },
377
- :'solid_queue.insights.enabled' => {
378
- description: 'Enable automatic data collection for SolidQueue.',
383
+ "solid_queue.insights.enabled": {
384
+ description: "Enable automatic data collection for SolidQueue.",
379
385
  default: true,
380
386
  type: Boolean
381
387
  },
382
- :'solid_queue.insights.events' => {
383
- description: 'Enable automatic event capturing for SolidQueue.',
388
+ "solid_queue.insights.events": {
389
+ description: "Enable automatic event capturing for SolidQueue.",
384
390
  default: true,
385
391
  type: Boolean
386
392
  },
387
- :'solid_queue.insights.metrics' => {
388
- description: 'Enable automatic metric data collection for SolidQueue.',
393
+ "solid_queue.insights.metrics": {
394
+ description: "Enable automatic metric data collection for SolidQueue.",
389
395
  default: false,
390
396
  type: Boolean
391
397
  },
392
- :'solid_queue.insights.cluster_collection' => {
393
- description: 'Collect cluster based metrics for SolidQueue.',
398
+ "solid_queue.insights.cluster_collection": {
399
+ description: "Collect cluster based metrics for SolidQueue.",
394
400
  default: true,
395
401
  type: Boolean
396
402
  },
397
- :'solid_queue.insights.collection_interval' => {
398
- description: 'The frequency in which SolidQueue cluster metrics are sampled.',
403
+ "solid_queue.insights.collection_interval": {
404
+ description: "The frequency in which SolidQueue cluster metrics are sampled.",
399
405
  default: 5,
400
406
  type: Integer
401
407
  },
402
- :'rails.insights.enabled' => {
403
- description: 'Enable automatic data collection for Ruby on Rails.',
408
+ "rails.insights.enabled": {
409
+ description: "Enable automatic data collection for Ruby on Rails.",
404
410
  default: true,
405
411
  type: Boolean
406
412
  },
407
- :'rails.insights.events' => {
408
- description: 'Enable automatic event capturing for Ruby on Rails.',
413
+ "rails.insights.events": {
414
+ description: "Enable automatic event capturing for Ruby on Rails.",
409
415
  default: true,
410
416
  type: Boolean
411
417
  },
412
- :'rails.insights.metrics' => {
413
- description: 'Enable automatic metric data collection for Ruby on Rails.',
418
+ "rails.insights.metrics": {
419
+ description: "Enable automatic metric data collection for Ruby on Rails.",
414
420
  default: false,
415
421
  type: Boolean
416
422
  },
417
- :'karafka.insights.enabled' => {
418
- description: 'Enable automatic data collection for Karafka.',
423
+ "karafka.insights.enabled": {
424
+ description: "Enable automatic data collection for Karafka.",
419
425
  default: true,
420
426
  type: Boolean
421
427
  },
422
- :'karafka.insights.events' => {
423
- description: 'Enable automatic event capturing for Karafka.',
428
+ "karafka.insights.events": {
429
+ description: "Enable automatic event capturing for Karafka.",
424
430
  default: true,
425
431
  type: Boolean
426
432
  },
427
- :'karafka.insights.metrics' => {
428
- description: 'Enable automatic metric data collection for Karafka.',
433
+ "karafka.insights.metrics": {
434
+ description: "Enable automatic metric data collection for Karafka.",
429
435
  default: false,
430
436
  type: Boolean
431
437
  },
432
- :'net_http.insights.enabled' => {
433
- description: 'Allow automatic instrumentation of Net::HTTP requests.',
438
+ "net_http.insights.enabled": {
439
+ description: "Allow automatic instrumentation of Net::HTTP requests.",
434
440
  default: true,
435
441
  type: Boolean
436
442
  },
437
- :'net_http.insights.events' => {
438
- description: 'Enable automatic event capturing for Net::HTTP requests.',
443
+ "net_http.insights.events": {
444
+ description: "Enable automatic event capturing for Net::HTTP requests.",
439
445
  default: true,
440
446
  type: Boolean
441
447
  },
442
- :'net_http.insights.metrics' => {
443
- description: 'Enable automatic metric data collection for Net::HTTP requests.',
448
+ "net_http.insights.metrics": {
449
+ description: "Enable automatic metric data collection for Net::HTTP requests.",
444
450
  default: false,
445
451
  type: Boolean
446
452
  },
447
- :'net_http.insights.full_url' => {
448
- description: 'Record the full request url during instrumentation.',
453
+ "net_http.insights.full_url": {
454
+ description: "Record the full request url during instrumentation.",
449
455
  default: false,
450
456
  type: Boolean
451
457
  },
452
- :'sinatra.enabled' => {
453
- description: 'Enable Sinatra auto-initialization.',
458
+ "sinatra.enabled": {
459
+ description: "Enable Sinatra auto-initialization.",
454
460
  default: true,
455
461
  type: Boolean
456
462
  },
457
- :'rails.subscriber_ignore_sources' => {
463
+ "rails.subscriber_ignore_sources": {
458
464
  description: "Sources (strings or regexes) that should be ignored when using the Rails' (7+) native error reporter (handled exceptions only).",
459
465
  # External libraries (eg Sidekiq, Resque) may wrap their execution in Rails' executor.
460
466
  # But this means errors will first be reported by Rails.error, before the library's native error handler
461
467
  # We ignore these reports, since the native error handler provides more context (such as job details)
462
- default: ['application.active_support'],
468
+ default: ["application.active_support"],
463
469
  type: Array
464
470
  },
465
- :'resque.resque_retry.send_exceptions_when_retrying' => {
466
- description: 'Send exceptions when retrying job.',
471
+ "resque.resque_retry.send_exceptions_when_retrying": {
472
+ description: "Send exceptions when retrying job.",
467
473
  default: true,
468
474
  type: Boolean
469
475
  },
470
- :'breadcrumbs.enabled' => {
471
- description: 'Disable breadcrumb functionality.',
476
+ "breadcrumbs.enabled": {
477
+ description: "Disable breadcrumb functionality.",
472
478
  default: true,
473
479
  type: Boolean
474
480
  },
475
- :'breadcrumbs.active_support_notifications' => {
476
- description: 'Configuration for automatic Active Support Instrumentation events.',
481
+ "breadcrumbs.active_support_notifications": {
482
+ description: "Configuration for automatic Active Support Instrumentation events.",
477
483
  default: Breadcrumbs::ActiveSupport.default_notifications,
478
484
  type: Hash
479
485
  },
480
- :'breadcrumbs.logging.enabled' => {
481
- description: 'Enable/Disable automatic breadcrumbs from log messages.',
486
+ "breadcrumbs.logging.enabled": {
487
+ description: "Enable/Disable automatic breadcrumbs from log messages.",
482
488
  default: true,
483
489
  type: Boolean
484
490
  },
485
- :'insights.enabled' => {
491
+ "insights.enabled": {
486
492
  description: "Enable/Disable Honeybadger Insights built-in instrumentation.",
487
- default: false,
493
+ default: true,
488
494
  type: Boolean
489
495
  },
490
- :'insights.console.enabled' => {
496
+ "insights.console.enabled": {
491
497
  description: "Enable/Disable Honeybadger Insights built-in instrumentation in a Rails console.",
492
498
  default: false,
493
499
  type: Boolean
494
500
  },
495
- :'insights.registry_flush_interval' => {
501
+ "insights.registry_flush_interval": {
496
502
  description: "Number of seconds between registry flushes.",
497
503
  default: 60,
498
504
  type: Integer
499
505
  },
500
- :'puma.insights.events' => {
501
- description: 'Enable automatic event capturing for Puma stats.',
506
+ "puma.insights.events": {
507
+ description: "Enable automatic event capturing for Puma stats.",
502
508
  default: true,
503
509
  type: Boolean
504
510
  },
505
- :'puma.insights.metrics' => {
506
- description: 'Enable automatic metric data aggregation for Puma stats.',
511
+ "puma.insights.metrics": {
512
+ description: "Enable automatic metric data aggregation for Puma stats.",
507
513
  default: false,
508
514
  type: Boolean
509
515
  },
510
- :'puma.insights.collection_interval' => {
511
- description: 'The frequency in which the Honeybadger gem will collect Puma stats.',
516
+ "puma.insights.collection_interval": {
517
+ description: "The frequency in which the Honeybadger gem will collect Puma stats.",
512
518
  default: 1,
513
519
  type: Integer
514
520
  },
515
- :'autotuner.insights.events' => {
516
- description: 'Enable automatic event capturing for Autotuner stats.',
521
+ "autotuner.insights.events": {
522
+ description: "Enable automatic event capturing for Autotuner stats.",
517
523
  default: true,
518
524
  type: Boolean
519
525
  },
520
- :'autotuner.insights.metrics' => {
521
- description: 'Enable automatic metric data aggregation for Autotuner stats.',
526
+ "autotuner.insights.metrics": {
527
+ description: "Enable automatic metric data aggregation for Autotuner stats.",
522
528
  default: false,
523
529
  type: Boolean
524
530
  }
525
531
  }.freeze
526
532
 
527
- DEFAULTS = Hash[OPTIONS.map{|k,v| [k, v[:default]] }].freeze
533
+ DEFAULTS = OPTIONS.map { |k, v| [k, v[:default]] }.to_h.freeze
528
534
  end
529
535
  end