sentry-sidekiq 4.2.0 → 4.5.0.pre.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.craft.yml +2 -2
- data/CHANGELOG.md +25 -0
- data/Gemfile +1 -2
- data/Makefile +4 -0
- data/example/error_worker.rb +2 -0
- data/lib/sentry-sidekiq.rb +1 -1
- data/lib/sentry/sidekiq/context_filter.rb +9 -1
- data/lib/sentry/sidekiq/error_handler.rb +1 -1
- data/lib/sentry/sidekiq/sentry_context_middleware.rb +17 -2
- data/lib/sentry/sidekiq/version.rb +1 -1
- data/sentry-sidekiq.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb6ad9f9e241ec6313a836b810e17ec5aec5c87dc32768a5fc69b436c9c5b50f
|
4
|
+
data.tar.gz: de8f1dc9d096cd5859c93cc16bb749ee202baf240d90ab624559eb3d09fd3366
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4973c196fecccb3ffd1107080d2d5a2dd0061ab1729afb32c8cdaa25e0bda8eee45ade3aebee5d29837ca13c27d5e3685fa37505f6129b709c983379c47ad52
|
7
|
+
data.tar.gz: 5e98a18c9b7b11579fdff82a70de052dd55e25bf8ac9f0d18405abb407bf98ce2b06b8a54045ebe6d7c470e86bb8e4a2392d7df11dffc8d068d31ccbfed007ac
|
data/.craft.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,30 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.4.0
|
4
|
+
|
5
|
+
### Features
|
6
|
+
|
7
|
+
- Make Sidekiq job context more readable [#1410](https://github.com/getsentry/sentry-ruby/pull/1410)
|
8
|
+
|
9
|
+
**Before**
|
10
|
+
|
11
|
+
<img width="60%" alt="Sidekiq payload in extra" src="https://user-images.githubusercontent.com/5079556/115679342-0ed8d000-a385-11eb-8e1c-372cb1af572e.png">
|
12
|
+
|
13
|
+
**After**
|
14
|
+
|
15
|
+
<img width="60%" alt="Sidekiq payload in context" src="https://user-images.githubusercontent.com/5079556/115679353-126c5700-a385-11eb-867c-a9a25d1a7099.png">
|
16
|
+
|
17
|
+
## 4.3.0
|
18
|
+
|
19
|
+
### Features
|
20
|
+
|
21
|
+
- Support performance monitoring on Sidekiq workers [#1311](https://github.com/getsentry/sentry-ruby/pull/1311)
|
22
|
+
|
23
|
+
## 4.2.1
|
24
|
+
|
25
|
+
- Use ::Rails::Railtie for checking Rails definition [#1284](https://github.com/getsentry/sentry-ruby/pull/1284)
|
26
|
+
- Fixes [#1276](https://github.com/getsentry/sentry-ruby/issues/1276)
|
27
|
+
|
3
28
|
## 4.2.0
|
4
29
|
|
5
30
|
### Features
|
data/Gemfile
CHANGED
@@ -3,8 +3,7 @@ source "https://rubygems.org"
|
|
3
3
|
# Specify your gem's dependencies in sentry-ruby.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
|
7
|
-
gem "i18n", "<= 1.8.7"
|
6
|
+
gem "i18n", "~> 1.8.9"
|
8
7
|
|
9
8
|
gem "rake", "~> 12.0"
|
10
9
|
gem "rspec", "~> 3.0"
|
data/Makefile
CHANGED
data/example/error_worker.rb
CHANGED
data/lib/sentry-sidekiq.rb
CHANGED
@@ -18,7 +18,15 @@ module Sentry
|
|
18
18
|
# these magic reserved keys, ActiveJob will throw up and error. We want to
|
19
19
|
# capture these and mutate the keys so we can sanely report it.
|
20
20
|
def filtered
|
21
|
-
filter_context(context)
|
21
|
+
filtered_context = filter_context(context)
|
22
|
+
|
23
|
+
if job_entry = filtered_context.delete(:job)
|
24
|
+
job_entry.each do |k, v|
|
25
|
+
filtered_context[k] = v
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
filtered_context
|
22
30
|
end
|
23
31
|
|
24
32
|
def transaction_name
|
@@ -11,15 +11,30 @@ module Sentry
|
|
11
11
|
Sentry.clone_hub_to_current_thread
|
12
12
|
scope = Sentry.get_current_scope
|
13
13
|
scope.set_tags(queue: queue, jid: job["jid"])
|
14
|
-
scope.
|
14
|
+
scope.set_contexts(sidekiq: job.merge("queue" => queue))
|
15
15
|
scope.set_transaction_name(context_filter.transaction_name)
|
16
|
+
transaction = Sentry.start_transaction(name: scope.transaction_name, op: "sidekiq")
|
17
|
+
scope.set_span(transaction) if transaction
|
16
18
|
|
17
|
-
|
19
|
+
begin
|
20
|
+
yield
|
21
|
+
rescue => e
|
22
|
+
finish_transaction(transaction, 500)
|
23
|
+
raise
|
24
|
+
end
|
18
25
|
|
26
|
+
finish_transaction(transaction, 200)
|
19
27
|
# don't need to use ensure here
|
20
28
|
# if the job failed, we need to keep the scope for error handler. and the scope will be cleared there
|
21
29
|
scope.clear
|
22
30
|
end
|
31
|
+
|
32
|
+
def finish_transaction(transaction, status)
|
33
|
+
return unless transaction
|
34
|
+
|
35
|
+
transaction.set_http_status(status)
|
36
|
+
transaction.finish
|
37
|
+
end
|
23
38
|
end
|
24
39
|
end
|
25
40
|
end
|
data/sentry-sidekiq.gemspec
CHANGED
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: 4.
|
4
|
+
version: 4.5.0.pre.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sentry-ruby-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.5.0.pre.beta.1
|
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: 4.
|
26
|
+
version: 4.5.0.pre.beta.1
|
27
27
|
description: A gem that provides Sidekiq integration for the Sentry error logger
|
28
28
|
email: accounts@sentry.io
|
29
29
|
executables: []
|
@@ -72,11 +72,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '2.4'
|
73
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- - "
|
75
|
+
- - ">"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
77
|
+
version: 1.3.1
|
78
78
|
requirements: []
|
79
|
-
rubygems_version: 3.
|
79
|
+
rubygems_version: 3.1.6
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
82
|
summary: A gem that provides Sidekiq integration for the Sentry error logger
|