sentry-sidekiq 5.10.0 → 5.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +9 -3
- data/README.md +1 -1
- data/lib/sentry/sidekiq/sentry_context_middleware.rb +4 -5
- data/lib/sentry/sidekiq/version.rb +1 -1
- data/sentry-sidekiq.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8ca295fef5c66be6f425299d140e11348cfe2e32e02cd57a5edc387eae496eb
|
4
|
+
data.tar.gz: 9ffdbbc597aed137b54eb5c9828a86cea335cb58fceab63661426da2c06d3169
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb9e68ea2e6a0c3eeae1022b309973e2785ced4eb555122a1aab43b25073ee8050ddd756f0c9310cbfe7ffc691834f22d616289d423514ab10556821e8eb1f58
|
7
|
+
data.tar.gz: 7c23f656463f868e77cecfba94741150604ecf94a1e6411270266855b7085e8c5ae3d9f2f6ca3bd93f79173bebe72e0b1950288ded7a7c679505cada2595b715
|
data/Gemfile
CHANGED
@@ -17,9 +17,16 @@ gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5
|
|
17
17
|
|
18
18
|
sidekiq_version = ENV["SIDEKIQ_VERSION"]
|
19
19
|
sidekiq_version = "6.0" if sidekiq_version.nil?
|
20
|
+
sidekiq_version = Gem::Version.new(sidekiq_version)
|
20
21
|
|
21
|
-
|
22
|
-
|
22
|
+
if sidekiq_version >= Gem::Version.new("7.0")
|
23
|
+
# This is for a unreleased fix for sidekiq 7
|
24
|
+
# https://github.com/sidekiq/sidekiq/commit/b7236f814ccb61d3b1e6fc5251ed3d3ac7428eb3
|
25
|
+
gem "sidekiq", github: "sidekiq/sidekiq"
|
26
|
+
else
|
27
|
+
gem "sidekiq", "~> #{sidekiq_version}"
|
28
|
+
end
|
29
|
+
gem "rails", "> 5.0.0", "< 7.1.0"
|
23
30
|
|
24
31
|
if RUBY_VERSION.to_f >= 2.6
|
25
32
|
gem "debug", github: "ruby/debug", platform: :ruby
|
@@ -27,4 +34,3 @@ if RUBY_VERSION.to_f >= 2.6
|
|
27
34
|
end
|
28
35
|
|
29
36
|
gem "pry"
|
30
|
-
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
[![Gem Version](https://img.shields.io/gem/v/sentry-sidekiq.svg)](https://rubygems.org/gems/sentry-sidekiq)
|
14
|
-
![Build Status](https://github.com/getsentry/sentry-ruby/workflows/
|
14
|
+
![Build Status](https://github.com/getsentry/sentry-ruby/actions/workflows/sentry_sidekiq_test.yml/badge.svg)
|
15
15
|
[![Coverage Status](https://img.shields.io/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecov.io/gh/getsentry/sentry-ruby/branch/master)
|
16
16
|
[![Gem](https://img.shields.io/gem/dt/sentry-sidekiq.svg)](https://rubygems.org/gems/sentry-sidekiq/)
|
17
17
|
[![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=sentry-sidekiq&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=sentry-sidekiq&package-manager=bundler&version-scheme=semver)
|
@@ -19,7 +19,7 @@ module Sentry
|
|
19
19
|
scope.set_tags(build_tags(job["tags"]))
|
20
20
|
scope.set_contexts(sidekiq: job.merge("queue" => queue))
|
21
21
|
scope.set_transaction_name(context_filter.transaction_name, source: :task)
|
22
|
-
transaction = start_transaction(scope, job["
|
22
|
+
transaction = start_transaction(scope, job["trace_propagation_headers"])
|
23
23
|
scope.set_span(transaction) if transaction
|
24
24
|
|
25
25
|
begin
|
@@ -39,9 +39,9 @@ module Sentry
|
|
39
39
|
Array(tags).each_with_object({}) { |name, tags_hash| tags_hash[:"sidekiq.#{name}"] = true }
|
40
40
|
end
|
41
41
|
|
42
|
-
def start_transaction(scope,
|
42
|
+
def start_transaction(scope, env)
|
43
43
|
options = { name: scope.transaction_name, source: scope.transaction_source, op: OP_NAME }
|
44
|
-
transaction = Sentry
|
44
|
+
transaction = Sentry.continue_trace(env, **options)
|
45
45
|
Sentry.start_transaction(transaction: transaction, **options)
|
46
46
|
end
|
47
47
|
|
@@ -58,9 +58,8 @@ module Sentry
|
|
58
58
|
return yield unless Sentry.initialized?
|
59
59
|
|
60
60
|
user = Sentry.get_current_scope.user
|
61
|
-
transaction = Sentry.get_current_scope.get_transaction
|
62
61
|
job["sentry_user"] = user unless user.empty?
|
63
|
-
job["
|
62
|
+
job["trace_propagation_headers"] ||= Sentry.get_trace_propagation_headers
|
64
63
|
yield
|
65
64
|
end
|
66
65
|
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.12.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.12.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: 2023-
|
11
|
+
date: 2023-10-10 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.12.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.12.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sidekiq
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|