sidekiq-instrument 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq/instrument/middleware/server.rb +8 -4
- data/lib/sidekiq/instrument/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15f6647c70a9728ad1feb253f921cc68994a32256de015a1c45f147b6aff72ec
|
4
|
+
data.tar.gz: c645b679c715dfe90a6713e56a9b2f3720105ffc065249e7eaec9a614e3e67b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 957b8590030205b27196985aed50e0b4801772ea8a1a7b25f30bc98cb369c8d623b49936d3acd974b5be703925eee0d6f790abffc7b2b05e71bcd481a098399f
|
7
|
+
data.tar.gz: ed94944e7cf926f9f54056d072c493d111ad7070da3917f8650d282f045da8ecd4a2547ffb0789a3ce2e49f40ecd6c4a88b1175adf10dbf5dda2194eb1b23b2f
|
@@ -15,17 +15,21 @@ module Sidekiq::Instrument
|
|
15
15
|
start_time = Time.now
|
16
16
|
yield block
|
17
17
|
execution_time_ms = (Time.now - start_time) * 1000
|
18
|
-
Statter.statsd.measure(metric_name(worker, 'runtime'), execution_time_ms)
|
19
18
|
Statter.dogstatsd&.timing('sidekiq.runtime', execution_time_ms, worker_dog_options(worker))
|
20
|
-
|
19
|
+
Statter.statsd.measure(metric_name(worker, 'runtime'), execution_time_ms)
|
20
|
+
rescue Exception => e
|
21
|
+
dd_options = worker_dog_options(worker)
|
22
|
+
dd_options[:tags] << "error:#{e.class.name}"
|
23
|
+
|
21
24
|
# if we have retries left, increment the enqueue.retry counter to indicate the job is going back on the queue
|
22
25
|
if max_retries(worker) > current_retries(job) + 1
|
23
26
|
WorkerMetrics.trace_workers_increment_counter(worker.class.to_s.underscore)
|
24
|
-
Statter.dogstatsd&.increment('sidekiq.enqueue.retry',
|
27
|
+
Statter.dogstatsd&.increment('sidekiq.enqueue.retry', dd_options)
|
25
28
|
end
|
26
29
|
|
30
|
+
Statter.dogstatsd&.increment('sidekiq.error', dd_options)
|
27
31
|
Statter.statsd.increment(metric_name(worker, 'error'))
|
28
|
-
|
32
|
+
|
29
33
|
raise e
|
30
34
|
ensure
|
31
35
|
WorkerMetrics.trace_workers_decrement_counter(worker.class.to_s.underscore)
|
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.7.
|
4
|
+
version: 0.7.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: 2024-09-
|
11
|
+
date: 2024-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|