sentry-ruby 5.15.0 → 5.15.2

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: ed83b6915b7b845897d60615cf014a4390057988f8902cce127d4a0cd4374828
4
+ data.tar.gz: 123678c45d2fe455db04c058c33a7f87c515c76d90dba6dfe7e44e558c8ecb6e
5
5
  SHA512:
6
- metadata.gz: d8bce6cfd5f48acb743b6018e5d34e4832de9eb05e68a0c114fd90bb13e8c80fcf6da97cb8e80a64d78e930b3ee6b8ee22711c2efa2e018f43b33d0ff09cf68b
7
- data.tar.gz: 1f9749bf1ccee5a541c4949dbf2b0f79da9508f6a86aa3d603811b252a49f4ca3054e91dfa7a0e93dac723965e8e316f56c8433ddf796c7d8f38069075b80268
6
+ metadata.gz: 784bce1a9edaefd7e3740af4f445c0fa01bd3240f53a963559a389a121ca1205ef0f179e1964b00da9232bde473464d6abcacb05fcb912a5f5a46533cb5dbb6e
7
+ data.tar.gz: 11b205d8ba4f3649ee42b66af1510a62673fa791d5ff28aa687c68ad94b17ed3e54c9c57536a07d3cf6d4a5ee5504e5bf9871ec00bb0dba457b661850b0f09b7
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
data/lib/sentry/client.rb CHANGED
@@ -48,7 +48,7 @@ module Sentry
48
48
  def capture_event(event, scope, hint = {})
49
49
  return unless configuration.sending_allowed?
50
50
 
51
- unless event.is_a?(TransactionEvent) || configuration.sample_allowed?
51
+ if event.is_a?(ErrorEvent) && !configuration.sample_allowed?
52
52
  transport.record_lost_event(:sample_rate, 'event')
53
53
  return
54
54
  end
@@ -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.2"
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.2
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-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby