sentry-delayed_job 5.4.2 → 5.6.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: d0e6c1573f80809db123f5680db8f03a83a5322a98ac3152552a6f27040c7de5
4
- data.tar.gz: d679a85e1e88628aada591fbb4d4b94ddeb3ba673002484eb0f892d9deae0ce2
3
+ metadata.gz: bdb9259dc389085b832064567d41a43046eb699a077306d29b5edc3d7587c6d3
4
+ data.tar.gz: 3724558d8dcbced5464b374a5ba7cc8074bf54a4d58df0e17f5a76574d59ef4a
5
5
  SHA512:
6
- metadata.gz: 6ec8f93057fdcac906f2ca716764df1862dd8d6e6a0c274a92f96316b7051d48297eb51604ba80091a305447ea71624fde79496ef99d4cb85d0b189b54724ce2
7
- data.tar.gz: 7d9cbb8607d26e5d7b2e224892baed24ef781f0a7bba9e493c550f66d35f3f456e41372f2e0fff68c05a505248fa0c74802bc2873b7dbef2b420e1a45e3b5995
6
+ metadata.gz: ab4afed79b5d52042c981b7aaa7b21a0cc7a8354ad06e03bc50946fc6ce6823f2f24af30d00c323904cf7f05470da2973c1d7b449a167195781a409ec3fd488d
7
+ data.tar.gz: b085b4aebc9f2b0a33236c2e21f7f02bc9bb74d4ea11e30088c690a3d5e5d108764e3ba51726567d9c13948301b5fea627f739bda56b311b192104604dbdabdf
@@ -7,6 +7,7 @@ module Sentry
7
7
  # need to symbolize strings as keyword arguments in Ruby 2.4~2.6
8
8
  DELAYED_JOB_CONTEXT_KEY = :"Delayed-Job"
9
9
  ACTIVE_JOB_CONTEXT_KEY = :"Active-Job"
10
+ OP_NAME = "queue.delayed_job".freeze
10
11
 
11
12
  callbacks do |lifecycle|
12
13
  lifecycle.around(:invoke_job) do |job, *args, &block|
@@ -14,11 +15,12 @@ module Sentry
14
15
 
15
16
  Sentry.with_scope do |scope|
16
17
  contexts = generate_contexts(job)
17
- scope.set_transaction_name(contexts.dig(ACTIVE_JOB_CONTEXT_KEY, :job_class) || contexts.dig(DELAYED_JOB_CONTEXT_KEY, :job_class))
18
+ name = contexts.dig(ACTIVE_JOB_CONTEXT_KEY, :job_class) || contexts.dig(DELAYED_JOB_CONTEXT_KEY, :job_class)
19
+ scope.set_transaction_name(name, source: :task)
18
20
  scope.set_contexts(**contexts)
19
21
  scope.set_tags("delayed_job.queue" => job.queue, "delayed_job.id" => job.id.to_s)
20
22
 
21
- transaction = Sentry.start_transaction(name: scope.transaction_name, op: "delayed_job")
23
+ transaction = Sentry.start_transaction(name: scope.transaction_name, source: scope.transaction_source, op: OP_NAME)
22
24
  scope.set_span(transaction) if transaction
23
25
 
24
26
  begin
@@ -85,7 +87,7 @@ module Sentry
85
87
 
86
88
  def self.finish_transaction(transaction, status)
87
89
  return unless transaction
88
-
90
+
89
91
  transaction.set_http_status(status)
90
92
  transaction.finish
91
93
  end
@@ -1,5 +1,5 @@
1
1
  module Sentry
2
2
  module DelayedJob
3
- VERSION = "5.4.2"
3
+ VERSION = "5.6.0"
4
4
  end
5
5
  end
@@ -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.4.2"
25
+ spec.add_dependency "sentry-ruby", "~> 5.6.0"
26
26
  spec.add_dependency "delayed_job", ">= 4.0"
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-delayed_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.2
4
+ version: 5.6.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-08-17 00:00:00.000000000 Z
11
+ date: 2022-11-08 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.4.2
19
+ version: 5.6.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.4.2
26
+ version: 5.6.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: delayed_job
29
29
  requirement: !ruby/object:Gem::Requirement