sentry-ruby 5.15.0 → 5.15.1

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
  SHA256:
3
- metadata.gz: 8ad04d5359f4cc44d2a2e398d1083b72f11c96efabc4a3b2148327261e327a20
4
- data.tar.gz: 2800581dce649c81f5a17464f3b5619158900d8c5eb23e35347507dddb594b04
3
+ metadata.gz: 76add924de8ccd4132764766cf92d057a7e4ee9554790688e2c2597b569097c2
4
+ data.tar.gz: 856d0936cb2ad123b3ca632e63cb8cf951e13f90755386dcb67b3cc63760ee69
5
5
  SHA512:
6
- metadata.gz: d8bce6cfd5f48acb743b6018e5d34e4832de9eb05e68a0c114fd90bb13e8c80fcf6da97cb8e80a64d78e930b3ee6b8ee22711c2efa2e018f43b33d0ff09cf68b
7
- data.tar.gz: 1f9749bf1ccee5a541c4949dbf2b0f79da9508f6a86aa3d603811b252a49f4ca3054e91dfa7a0e93dac723965e8e316f56c8433ddf796c7d8f38069075b80268
6
+ metadata.gz: 245ee7955da8f38b12db8e2ed18802fbb63a74efd5853968a91fe5e45551f17aa0dd95e8dd07458e1374817b33b3cfc6ab752406fea9f16f55a4027d204d622b
7
+ data.tar.gz: 7fd7cadec651b7464409154ed26eb41852bb2cfbf89bb3f57cecc102058a9b8498bf9f29670ebcd6c25048a1a353878adaadc8a8c1b816baf5b08baf0c380e54
data/Gemfile CHANGED
@@ -12,28 +12,9 @@ gem "redis", "~> #{redis_rb_version}"
12
12
 
13
13
  gem "puma"
14
14
 
15
- gem "rake", "~> 12.0"
16
- gem "rspec", "~> 3.0"
17
- gem "rspec-retry"
18
15
  gem "timecop"
19
- gem "simplecov"
20
- gem "simplecov-cobertura", "~> 1.4"
21
- gem "rexml"
22
16
  gem "stackprof" unless RUBY_PLATFORM == "java"
23
17
 
24
- ruby_version = Gem::Version.new(RUBY_VERSION)
25
-
26
- if ruby_version >= Gem::Version.new("2.6.0")
27
- gem "debug", github: "ruby/debug", platform: :ruby
28
- gem "irb"
29
-
30
- if ruby_version >= Gem::Version.new("3.0.0")
31
- gem "ruby-lsp-rspec"
32
- end
33
- end
34
-
35
- gem "pry"
36
-
37
18
  gem "benchmark-ips"
38
19
  gem "benchmark_driver"
39
20
  gem "benchmark-ipsa"
@@ -41,3 +22,5 @@ gem "benchmark-memory"
41
22
 
42
23
  gem "yard", github: "lsegal/yard"
43
24
  gem "webrick"
25
+
26
+ eval_gemfile File.expand_path("../Gemfile", __dir__)
@@ -13,10 +13,12 @@ module Sentry
13
13
  attr_reader :logger
14
14
  attr_accessor :shutdown_timeout
15
15
 
16
+ DEFAULT_MAX_QUEUE = 30
17
+
16
18
  def initialize(configuration)
17
- @max_queue = 30
18
19
  @shutdown_timeout = 1
19
20
  @number_of_threads = configuration.background_worker_threads
21
+ @max_queue = configuration.background_worker_max_queue
20
22
  @logger = configuration.logger
21
23
  @debug = configuration.debug
22
24
  @shutdown_callback = nil
@@ -40,6 +40,13 @@ module Sentry
40
40
  # @return [Integer]
41
41
  attr_accessor :background_worker_threads
42
42
 
43
+ # The maximum queue size for the background worker.
44
+ # Jobs will be rejected above this limit.
45
+ #
46
+ # Default is {BackgroundWorker::DEFAULT_MAX_QUEUE}.
47
+ # @return [Integer]
48
+ attr_accessor :background_worker_max_queue
49
+
43
50
  # a proc/lambda that takes an array of stack traces
44
51
  # it'll be used to silence (reduce) backtrace of the exception
45
52
  #
@@ -329,6 +336,7 @@ module Sentry
329
336
  self.app_dirs_pattern = nil
330
337
  self.debug = false
331
338
  self.background_worker_threads = Concurrent.processor_count
339
+ self.background_worker_max_queue = BackgroundWorker::DEFAULT_MAX_QUEUE
332
340
  self.backtrace_cleanup_callback = nil
333
341
  self.max_breadcrumbs = BreadcrumbBuffer::DEFAULT_SIZE
334
342
  self.breadcrumbs_logger = []
@@ -4,7 +4,7 @@ module Sentry
4
4
  MAX_SLUG_LENGTH = 50
5
5
 
6
6
  module Patch
7
- def perform(*args)
7
+ def perform(*args, **opts)
8
8
  slug = self.class.sentry_monitor_slug
9
9
  monitor_config = self.class.sentry_monitor_config
10
10
 
@@ -13,7 +13,8 @@ module Sentry
13
13
  monitor_config: monitor_config)
14
14
 
15
15
  start = Sentry.utc_now.to_i
16
- ret = super
16
+ # need to do this on ruby <= 2.6 sadly
17
+ ret = method(:perform).super_method.arity == 0 ? super() : super
17
18
  duration = Sentry.utc_now.to_i - start
18
19
 
19
20
  Sentry.capture_check_in(slug,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentry
4
- VERSION = "5.15.0"
4
+ VERSION = "5.15.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.15.0
4
+ version: 5.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-05 00:00:00.000000000 Z
11
+ date: 2023-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby