red_cross 0.2.12 → 0.2.13

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
  SHA1:
3
- metadata.gz: 6255408e36f20f43729e251e07e53853e50a620e
4
- data.tar.gz: 25a01c5edc94e4674bc282e26ece3d2f7b3bd1cd
3
+ metadata.gz: 80bda9d16c3fb5657294a309a3155d8b60b8ee87
4
+ data.tar.gz: 85de83d6ebf37a40ee274a4453077a05b43404de
5
5
  SHA512:
6
- metadata.gz: 6394974a4ed266b94a52698c312b33ea867c20a0cc119b141e70dc1bad9baac255e2799d845eb346bc438555aa64e6e9bcb813eff44979fc6460beda1e627405
7
- data.tar.gz: fe4f98010703f0d8bbd4786cae835033c62686f87cf9417fcb114b3605a31856db434972af32eeec453fb53dafee2043f254ed157adf99b60fdd5008c5c4d703
6
+ metadata.gz: 98a1d127b53dc23f2884c2ec2ea90b98a1bdd512f1bde0d8389f3210101400fc87c82248be169e2d605ac41e61b4ead81f58ef0a15d26737ae997ae6396d6451
7
+ data.tar.gz: e4ad913bfde2e20231df749c4aed78e00a14968c59fecbbb2795018e90a4149d7927fe3078018c7ae0bf19c4baa88dfac1d9978d422e1a3c723edd5e2811dac0
@@ -41,7 +41,7 @@ module Resque
41
41
 
42
42
  def on_failure_send_monitor_data(e, *args)
43
43
  @job_end_time = Time.now()
44
- send_metrics('failed', *args)
44
+ send_metrics('failed', *args, e)
45
45
  end
46
46
 
47
47
  def default_event_properties(*args)
@@ -56,9 +56,10 @@ module Resque
56
56
  end
57
57
  end
58
58
 
59
- def send_metrics(job_status, *args)
59
+ def send_metrics(job_status, *args, e = nil)
60
60
  default_event_properties(*args)
61
61
  @event_properties[:fields][:run_time] = ((@job_end_time - @job_start_time)*1000).to_i if %w(performed failed).include? job_status
62
+ @event_properties[:exception] = e.class.name unless e.nil?
62
63
  ::RedCross.monitor_track(event: 'resque', properties: @event_properties.merge({ job_status: job_status }))
63
64
  end
64
65
  end
@@ -1,3 +1,3 @@
1
1
  module RedCross
2
- VERSION = '0.2.12'
2
+ VERSION = '0.2.13'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red_cross
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - ronbarab
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-21 00:00:00.000000000 Z
11
+ date: 2017-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: analytics-ruby