sentry-sidekiq 4.2.1 → 4.3.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: 383b3c28fc5583dadfc497ae0c3b0dc052e7909f8e71e8d8eca728f68b060aea
4
- data.tar.gz: b867a8389fbd6e44b06a7256c6dafdc68f04acf2fe4dc2e99c84f647c010e614
3
+ metadata.gz: 58a2fdb9ebaf4e197fba06d2cae41179a91de332d5a6e4e65d27fa9173aa7a62
4
+ data.tar.gz: f13820fdaa0c2bc33e03a9301de7dd3f183ea199746842e626bbf9de4d948718
5
5
  SHA512:
6
- metadata.gz: 71cd8d00dc973f0521b387ea75b2d2aa52da2078b5bbb7cd1b14533f0db944b1f387dd02a6ed0272ea7958c2fe18981c5350b24121e68e846851ae1c8b3e21d0
7
- data.tar.gz: c1c3c647df576a8ed592d90a104dd171fe99c4b6cd775ee7364b9f9cbc84489b2614d20d085abf0c7ca1b5c3e71f3f2b50e0bdaf854321fa9b192fb153127b81
6
+ metadata.gz: 502d5c38a8652c16e099022d19eaaa6bd312e742996bd6039a34c30953b1b498938b9927a15d42a07f11478595566dd39f96b09bf06fc39c68bfa8271caade28
7
+ data.tar.gz: f72b90e8bb33e1edb00a805e1628057012756da73697c6148331e5668b16772b6000d45f35057ade6b4fcd9f759c10f619278da8f06c9463eee7ebe30911a0ee
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.3.0
4
+
5
+ ### Features
6
+
7
+ - Support performance monitoring on Sidekiq workers [#1311](https://github.com/getsentry/sentry-ruby/pull/1311)
8
+
3
9
  ## 4.2.1
4
10
 
5
11
  - Use ::Rails::Railtie for checking Rails definition [#1284](https://github.com/getsentry/sentry-ruby/pull/1284)
data/Makefile CHANGED
@@ -1,3 +1,7 @@
1
1
  build:
2
2
  bundle install
3
3
  gem build sentry-sidekiq.gemspec
4
+
5
+ test:
6
+ bundle exec rspec
7
+ WITH_SENTRY_RAILS=1 bundle exec rspec spec/sentry/rails_spec.rb
@@ -13,13 +13,28 @@ module Sentry
13
13
  scope.set_tags(queue: queue, jid: job["jid"])
14
14
  scope.set_extras(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
- yield
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
@@ -1,5 +1,5 @@
1
1
  module Sentry
2
2
  module Sidekiq
3
- VERSION = "4.2.1"
3
+ VERSION = "4.3.0"
4
4
  end
5
5
  end
@@ -22,5 +22,5 @@ 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-core", "~> 4.2.0"
25
+ spec.add_dependency "sentry-ruby-core", "~> 4.3.0"
26
26
  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: 4.2.1
4
+ version: 4.3.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: 2021-02-18 00:00:00.000000000 Z
11
+ date: 2021-03-12 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.2.0
19
+ version: 4.3.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: 4.2.0
26
+ version: 4.3.0
27
27
  description: A gem that provides Sidekiq integration for the Sentry error logger
28
28
  email: accounts@sentry.io
29
29
  executables: []