sentry-sidekiq 5.5.0 → 5.7.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d27fceba6eded4be64173dcc73e2eca6a33aa4a43a6b5822cb0f678ddab57b7
|
4
|
+
data.tar.gz: 7439fc14f039738f58bb932ab51e95a25f6db2a5ae81f5f884931016c0318036
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1e202c2ef2b8d33670757fbb2c66c15096f731ab91c65659d7bbe31fd157c633ada0b21fa43c3290fb2761090f147a1c9e17b22221c1faf569d072b9e1a380d
|
7
|
+
data.tar.gz: c4bcf617daf8bf34d938d68ace1558f27ff915bd186277dd0c7ee75911e0b685e95ff20e5c40088ee7d153c771fab4977dee3c0a60f3a6ed9a56985592909e54
|
@@ -3,6 +3,8 @@ require 'sentry/sidekiq/context_filter'
|
|
3
3
|
module Sentry
|
4
4
|
module Sidekiq
|
5
5
|
class ErrorHandler
|
6
|
+
WITH_SIDEKIQ_7 = ::Gem::Version.new(::Sidekiq::VERSION) >= ::Gem::Version.new("7.0")
|
7
|
+
|
6
8
|
def call(ex, context)
|
7
9
|
return unless Sentry.initialized?
|
8
10
|
|
@@ -40,7 +42,13 @@ module Sentry
|
|
40
42
|
when Integer
|
41
43
|
limit
|
42
44
|
when TrueClass
|
43
|
-
|
45
|
+
max_retries =
|
46
|
+
if WITH_SIDEKIQ_7
|
47
|
+
::Sidekiq.default_configuration[:max_retries]
|
48
|
+
else
|
49
|
+
::Sidekiq.options[:max_retries]
|
50
|
+
end
|
51
|
+
max_retries || 25
|
44
52
|
else
|
45
53
|
0
|
46
54
|
end
|
@@ -3,6 +3,8 @@ require 'sentry/sidekiq/context_filter'
|
|
3
3
|
module Sentry
|
4
4
|
module Sidekiq
|
5
5
|
class SentryContextServerMiddleware
|
6
|
+
OP_NAME = "queue.sidekiq".freeze
|
7
|
+
|
6
8
|
def call(_worker, job, queue)
|
7
9
|
return yield unless Sentry.initialized?
|
8
10
|
|
@@ -38,7 +40,7 @@ module Sentry
|
|
38
40
|
end
|
39
41
|
|
40
42
|
def start_transaction(scope, sentry_trace)
|
41
|
-
options = { name: scope.transaction_name, source: scope.transaction_source, op:
|
43
|
+
options = { name: scope.transaction_name, source: scope.transaction_source, op: OP_NAME }
|
42
44
|
transaction = Sentry::Transaction.from_sentry_trace(sentry_trace, **options) if sentry_trace
|
43
45
|
Sentry.start_transaction(transaction: transaction, **options)
|
44
46
|
end
|
data/sentry-sidekiq.gemspec
CHANGED
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_dependency "sentry-ruby", "~> 5.
|
25
|
+
spec.add_dependency "sentry-ruby", "~> 5.7.0"
|
26
26
|
spec.add_dependency "sidekiq", ">= 3.0"
|
27
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sentry-ruby
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.
|
19
|
+
version: 5.7.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.
|
26
|
+
version: 5.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sidekiq
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|