sidekiq-instrument 0.5.0 → 0.5.2

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: dec762f020453b49d17551ce8dba6146fad0b4fdb5c06fbc5ce17ad57bdafae5
4
- data.tar.gz: 98e6f98439a8a886a8ec4adc0b8daa83d181629ebe7f2e4020861dc66379c533
3
+ metadata.gz: 3818055d583770879264a519e270abd97900bdadc1fb38bfa341e68d08ea17b7
4
+ data.tar.gz: 14d508fbe113e65e6093d23ecc6dc3a56ddafb6924200b80af9fe737e42a9914
5
5
  SHA512:
6
- metadata.gz: 123de131fd9d2aa45d1256c2b4c53c25e1cdc1181b02ab16e230ca6e2cbdeda2785c8b2b58a20b27a5056a8dc2bfc48dfaff8ad26c887e60addb4684acb20162
7
- data.tar.gz: 56b1cb9ac84cb8ee016da9ab99fabe7e000b59c46b1c0b23a107798193f8ab979c9e782f3525b4ff8041455533ebe8837e375803e3313478e670e9137b203852
6
+ metadata.gz: 651b65e1354e88685c56a1bdc266efc8b1f8234e0e84ebeb4d989ea490f4ad15ab9e0fb3f4952ce7c864a3c1d3821dc5ea648219815915d668070dfaccd3a195
7
+ data.tar.gz: 91360c3448d562455fff7aa6ceb3d1198f72c88087bd0872bf00923cecd3ebf8d33079595873cba4c76c637eb32edaae671e8a439211d12bda4bc393cc6601ad
@@ -10,8 +10,9 @@ module Sidekiq::Instrument
10
10
  class_instance = klass.new
11
11
  Statter.statsd.increment(metric_name(class_instance, 'enqueue'))
12
12
  Statter.dogstatsd&.increment('sidekiq.enqueue', worker_dog_options(class_instance))
13
-
14
- yield
13
+ result = yield
14
+ Statter.dogstatsd&.flush(sync: true)
15
+ result
15
16
  end
16
17
  end
17
18
  end
@@ -17,6 +17,8 @@ module Sidekiq::Instrument
17
17
  Statter.statsd.increment(metric_name(worker, 'error'))
18
18
  Statter.dogstatsd&.increment('sidekiq.error', worker_dog_options(worker))
19
19
  raise e
20
+ ensure
21
+ Statter.dogstatsd&.flush(sync: true)
20
22
  end
21
23
  end
22
24
  end
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Instrument
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.2"
4
4
  end
5
5
  end
@@ -38,6 +38,8 @@ module Sidekiq::Instrument
38
38
  Statter.statsd.gauge("shared.sidekiq.#{queue.name}.latency", queue.latency)
39
39
  Statter.dogstatsd&.gauge('sidekiq.queue.latency', queue.latency, tags: ["queue:#{queue.name}"])
40
40
  end
41
+
42
+ Statter.dogstatsd&.flush(sync: true)
41
43
  end
42
44
  end
43
45
  end
@@ -1,4 +1,5 @@
1
- require 'active_support/core_ext/class/attribute'
1
+ require "active_support/core_ext/class/attribute"
2
+ require "statsd/instrument"
2
3
 
3
4
  require "sidekiq/instrument/statter"
4
5
  require "sidekiq/instrument/version"
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.add_dependency 'sidekiq', '>= 4.2', '< 7'
20
20
  spec.add_dependency 'statsd-instrument', '>= 2.0.4'
21
- spec.add_dependency 'dogstatsd-ruby', '~> 5.5.0'
21
+ spec.add_dependency 'dogstatsd-ruby', '~> 5.5'
22
22
  spec.add_dependency 'activesupport', '>= 5.1', '< 7'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 2.0', '>= 2.0.2'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-instrument
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loan Application Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-03 00:00:00.000000000 Z
11
+ date: 2022-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 5.5.0
53
+ version: '5.5'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 5.5.0
60
+ version: '5.5'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: activesupport
63
63
  requirement: !ruby/object:Gem::Requirement