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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db865235fec8b38f0539955fcea78d64af8bdd18652d5f8ddf9f6e184279d2a8
4
- data.tar.gz: 76b9633e492b0831927f8c07d22f8901e396ac11023013c92611652c8d7bfc5c
3
+ metadata.gz: 15f6647c70a9728ad1feb253f921cc68994a32256de015a1c45f147b6aff72ec
4
+ data.tar.gz: c645b679c715dfe90a6713e56a9b2f3720105ffc065249e7eaec9a614e3e67b9
5
5
  SHA512:
6
- metadata.gz: 53adc64be56592453878813e397a618070181df863bfd2f61f6e2b3e239a2e4705a3662c3051acfd5dd72621d71c63cef1c296cbbb82d1dc5a3e11c7f29a41bc
7
- data.tar.gz: 5fc9b80770108d223784cac1b16e381764d9b53afb4f1aa6250673cdcf83ea2c143b5a408ad836bd0df712064badf910cdaf00d7e0a27bf247c7df054a621b02
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
- rescue StandardError => e
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', worker_dog_options(worker))
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
- Statter.dogstatsd&.increment('sidekiq.error', worker_dog_options(worker))
32
+
29
33
  raise e
30
34
  ensure
31
35
  WorkerMetrics.trace_workers_decrement_counter(worker.class.to_s.underscore)
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Instrument
3
- VERSION = '0.7.1'
3
+ VERSION = '0.7.2'
4
4
  end
5
5
  end
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.1
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-05 00:00:00.000000000 Z
11
+ date: 2024-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq