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 +4 -4
- data/Gemfile +2 -19
- data/lib/sentry/background_worker.rb +3 -1
- data/lib/sentry/client.rb +1 -1
- data/lib/sentry/configuration.rb +8 -0
- data/lib/sentry/cron/monitor_check_ins.rb +3 -2
- data/lib/sentry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed83b6915b7b845897d60615cf014a4390057988f8902cce127d4a0cd4374828
|
4
|
+
data.tar.gz: 123678c45d2fe455db04c058c33a7f87c515c76d90dba6dfe7e44e558c8ecb6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
51
|
+
if event.is_a?(ErrorEvent) && !configuration.sample_allowed?
|
52
52
|
transport.record_lost_event(:sample_rate, 'event')
|
53
53
|
return
|
54
54
|
end
|
data/lib/sentry/configuration.rb
CHANGED
@@ -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
|
-
|
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,
|
data/lib/sentry/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|