honeybadger 2.4.1 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a105d5833ce1396256c5459dfaf25bce9ef247a7
4
- data.tar.gz: ad08da27af90089c63b9ad2a523c8d386bf884dc
3
+ metadata.gz: 6b273399623c138ffec42009c7122f5c3aa6f90f
4
+ data.tar.gz: e39041d6fb0875408024dbff43f53771c352433f
5
5
  SHA512:
6
- metadata.gz: ab6e2812609e9dc497f751fdf7d597bc798ac05830a87fe018bfa9dfd72e2dde1632d1334cf09fe873803d8c6b06968e100c99cb48a16da32c64683396024924
7
- data.tar.gz: c932cc1c2f3b9a8092bf38febc5b0c19c3b730a1c3d103010f0f00a51470d5f66c60d5ee5e10171ff4b9995810fb07625d4202051db570d3a31d718cb949efa2
6
+ metadata.gz: ceb029d691f5525a749c67935374e5bbe20fb7460838088b4d9aa89b854e16a7c237867373a48ba8aba832ae27376a6ebf85d060ca76a0918278de15fd4cb21a
7
+ data.tar.gz: 8e4f56eb4686c0effb008fed71cd9d7251f19e6c126740316e68b67e514a4ab97cda2cdef5c7ddea1b1ee4d1fca8d7579fb61817c5b757755337e0312d57cc34
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased][unreleased]
7
7
 
8
+ ## [2.5.0] - 2016-02-19
9
+ ### Added
10
+ - Configuration option max\_queue_size for maximum worker queue size.
11
+ - Add `resque.resque_retry.send_exceptions_when_retrying` config option.
12
+ -@davidguthu
13
+
8
14
  ## [2.4.1] - 2016-02-04
9
15
  ### Fixed
10
16
  - Never send traces or metrics when disabled by plan or config.
data/README.md CHANGED
@@ -256,6 +256,7 @@ You can use any of the options below in your config file, or in the environment.
256
256
  |`exceptions.rescue_rake` | Boolean | Enable rescuing exceptions in rake tasks.<br/>_Default: `true` when run in background; `false` when run in terminal._|
257
257
  |`exceptions.source_radius` | Integer | The number of lines before and after the source when reporting snippets.<br/>_Default: `2`_|
258
258
  |`exceptions.local_variables` | Boolean | Enable sending local variables. Requires the [binding_of_caller gem](https://rubygems.org/gems/binding_of_caller).<br/>_Default: `false`_|
259
+ |`exceptions.unwrap` | Boolean | Reports #original_exception or #cause one level up from rescued exception when available.<br/>_Default: `false`_|
259
260
  |&nbsp; | ||
260
261
  |__METRIC REPORTING__ | ||
261
262
  |`metrics.enabled` | Boolean | Enable sending metrics, such as requests per minute.<br/>_Default: `true`_|
@@ -38,7 +38,7 @@ module Honeybadger
38
38
  @throttles = []
39
39
  @mutex = Mutex.new
40
40
  @marker = ConditionVariable.new
41
- @queue = Queue.new(1000)
41
+ @queue = Queue.new(config.max_queue_size)
42
42
  @shutdown = false
43
43
  @start_at = nil
44
44
  end
@@ -200,6 +200,10 @@ module Honeybadger
200
200
  Thread.current[:__honeybadger_request] = nil
201
201
  end
202
202
 
203
+ def max_queue_size
204
+ self[:max_queue_size]
205
+ end
206
+
203
207
  def request_hash
204
208
  return DEFAULT_REQUEST_HASH unless request
205
209
  Rack::RequestHash.new(request)
@@ -76,6 +76,11 @@ module Honeybadger
76
76
  default: true,
77
77
  type: Boolean
78
78
  },
79
+ max_queue_size: {
80
+ description: 'Maximum number of items for each worker queue.',
81
+ default: 1000,
82
+ type: Integer
83
+ },
79
84
  plugins: {
80
85
  description: 'An optional list of plugins to load. Default is to load all plugins.',
81
86
  default: nil,
@@ -280,6 +285,11 @@ module Honeybadger
280
285
  description: 'Enable Sinatra auto-initialization.',
281
286
  default: true,
282
287
  type: Boolean
288
+ },
289
+ :'resque.resque_retry.send_exceptions_when_retrying' => {
290
+ description: 'Send exceptions when retrying job.',
291
+ default: true,
292
+ type: Boolean
283
293
  }
284
294
  }.freeze
285
295
 
@@ -12,13 +12,25 @@ module Honeybadger
12
12
  yield
13
13
  end
14
14
  rescue Exception => e
15
- Honeybadger.notify(e, parameters: { job_arguments: args })
15
+ Honeybadger.notify(e, parameters: { job_arguments: args }) if send_exception?(e)
16
16
  raise e
17
17
  end
18
18
  end
19
19
  ensure
20
20
  Honeybadger.context.clear!
21
21
  end
22
+
23
+ def send_exception?(e)
24
+ if defined?(::Resque::Plugins::Retry)
25
+ if ::Honeybadger::Agent.config[:'resque.resque_retry.send_exceptions_when_retrying']
26
+ true
27
+ else
28
+ !self.payload_class.retry_criteria_valid?(e)
29
+ end
30
+ else
31
+ true
32
+ end
33
+ end
22
34
  end
23
35
 
24
36
  module Installer
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # Public: The current String Honeybadger version.
3
- VERSION = '2.4.1'.freeze
3
+ VERSION = '2.5.0'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Honeybadger Industries LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-04 00:00:00.000000000 Z
11
+ date: 2016-02-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email:
@@ -21,30 +21,7 @@ files:
21
21
  - CHANGELOG.md
22
22
  - LICENSE
23
23
  - README.md
24
- - bin/appraisal
25
- - bin/autospec
26
- - bin/bundler
27
- - bin/byebug
28
- - bin/cap
29
- - bin/capify
30
- - bin/cc-tddium-post-worker
31
- - bin/coderay
32
- - bin/cucumber
33
- - bin/guard
34
24
  - bin/honeybadger
35
- - bin/htmldiff
36
- - bin/ldiff
37
- - bin/listen
38
- - bin/pry
39
- - bin/rackup
40
- - bin/rake
41
- - bin/rdoc
42
- - bin/ri
43
- - bin/rspec
44
- - bin/ruby-prof
45
- - bin/ruby-prof-check-trace
46
- - bin/safe_yaml
47
- - bin/thor
48
25
  - lib/honeybadger.rb
49
26
  - lib/honeybadger/agent.rb
50
27
  - lib/honeybadger/agent/batch.rb
@@ -163,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
140
  version: '0'
164
141
  requirements: []
165
142
  rubyforge_project:
166
- rubygems_version: 2.4.5.1
143
+ rubygems_version: 2.4.5
167
144
  signing_key:
168
145
  specification_version: 4
169
146
  summary: Error reports you can be happy about.
data/bin/appraisal DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'appraisal' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("appraisal", "appraisal")
data/bin/autospec DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'autospec' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('rspec-core', 'autospec')
data/bin/bundler DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'bundler' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('bundler', 'bundler')
data/bin/byebug DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'byebug' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("byebug", "byebug")
data/bin/cap DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'cap' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("capistrano", "cap")
data/bin/capify DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'capify' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("capistrano", "capify")
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'cc-tddium-post-worker' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("codeclimate-test-reporter", "cc-tddium-post-worker")
data/bin/coderay DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'coderay' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("coderay", "coderay")
data/bin/cucumber DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'cucumber' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("cucumber", "cucumber")
data/bin/guard DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'guard' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("guard", "guard")
data/bin/htmldiff DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'htmldiff' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("diff-lcs", "htmldiff")
data/bin/ldiff DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'ldiff' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("diff-lcs", "ldiff")
data/bin/listen DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'listen' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("listen", "listen")
data/bin/pry DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'pry' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("pry", "pry")
data/bin/rackup DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rackup' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('rack', 'rackup')
data/bin/rake DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rake' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("rake", "rake")
data/bin/rdoc DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rdoc' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("rdoc", "rdoc")
data/bin/ri DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'ri' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("rdoc", "ri")
data/bin/rspec DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rspec' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("rspec-core", "rspec")
data/bin/ruby-prof DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'ruby-prof' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("ruby-prof", "ruby-prof")
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'ruby-prof-check-trace' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("ruby-prof", "ruby-prof-check-trace")
data/bin/safe_yaml DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'safe_yaml' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("safe_yaml", "safe_yaml")
data/bin/thor DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'thor' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require "rubygems"
14
- require "bundler/setup"
15
-
16
- load Gem.bin_path("thor", "thor")