sidekiq-instrument 0.5.0 → 0.5.1

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: dba857b68ec105ba55cf962fac3549c2b0c3949859bcebbb2363087ce2965241
4
+ data.tar.gz: 99d18adae251771f64a2b1e0f9088c2bf3c1863f9a8a0ec8ebfc40caa3052a0d
5
5
  SHA512:
6
- metadata.gz: 123de131fd9d2aa45d1256c2b4c53c25e1cdc1181b02ab16e230ca6e2cbdeda2785c8b2b58a20b27a5056a8dc2bfc48dfaff8ad26c887e60addb4684acb20162
7
- data.tar.gz: 56b1cb9ac84cb8ee016da9ab99fabe7e000b59c46b1c0b23a107798193f8ab979c9e782f3525b4ff8041455533ebe8837e375803e3313478e670e9137b203852
6
+ metadata.gz: e34e0ebf291cf1a869013b042613936c367f84116a2a582ea463dbd9b8bf00b7a11e4fed8dbc87d8ac5946e8d590dbcce769e87394ca75a0906b234440ac746c
7
+ data.tar.gz: a9af77fa66acd59ba2552481ede5c24ce308befd307dcd86f7b79552a1d8e8a7665b8c9a6a2e97bdb49edc8f890dc862fcadd3b8d4c41ac38021da3ff852f621
@@ -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.1"
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
@@ -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.1
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-10 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