restful_resource 1.4.2 → 1.4.3

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: 7ec89f5aff66263aa662e83535625118f92faad2
4
- data.tar.gz: f8653d759998fb91a5ac0fdb52d340edb55beafd
3
+ metadata.gz: 56a70ef576d82b815645f5293fc6fcac6aaa2de1
4
+ data.tar.gz: 4d4cb903d304ab10a2cca3f803ad51700719db85
5
5
  SHA512:
6
- metadata.gz: 1f7050817b74a710234c0374aa388b4f3f3758ca9694ef49d89430894ae62a7edf0e375579556dc9978fac8d19075c204bc303cc82cb6a22d9c348343ab7ca57
7
- data.tar.gz: 12bd9dc5305fc0b362dc94420ec6d7f55172203e775caf0dbeecdf242fb463275dab5f29d2c6656eb5e5d8c80b2eb3b1a221364918d50f3b604f92dad967a0d4
6
+ metadata.gz: 28161659ff5b9b9b02c2393ed01736de593bfd63b153c49b076394ac2e0325291d0f774bc5040b46221d374f5c8edc70d4afb9629653116848dc30b632403bd6
7
+ data.tar.gz: f8e5441a5166cfe4950c17be4cf06898f5aaed831eef7db87b5efc6a724570bcf5ea0af3d58bf976ffd16d9310ad94a565f93a6a7c1f99cfebe5b9d52d654041
@@ -24,18 +24,18 @@ module RestfulResource
24
24
 
25
25
  # Outputs per API log lines like:
26
26
  # measure#quotes_site.research_site_api.time=215.161237
27
- # sample#quotes_site.research_site_api.status=200
27
+ # count#quotes_site.research_site_api.status.200=1
28
28
  # count#quotes_site.research_site_api.called=1
29
29
  metric_class.measure cache_notifier_namespace(metric: 'time'), event.duration
30
- metric_class.sample cache_notifier_namespace(metric: 'status'), status
30
+ metric_class.count cache_notifier_namespace(metric: "status.#{status}"), 1
31
31
  metric_class.count cache_notifier_namespace(metric: 'called'), 1
32
32
 
33
33
  # Outputs per resource log lines like:
34
34
  # measure#quotes_site.research_site_api.api_v2_cap_derivatives.time=215.161237
35
- # sample#quotes_site.research_site_api.api_v2_cap_derivatives.status=200
35
+ # count#quotes_site.research_site_api.api_v2_cap_derivatives.status.200=1
36
36
  # count#quotes_site.research_site_api.api_v2_cap_derivatives.called=1
37
37
  metric_class.measure cache_notifier_namespace(metric: 'time', event: event), event.duration
38
- metric_class.sample cache_notifier_namespace(metric: 'status', event: event), status
38
+ metric_class.count cache_notifier_namespace(metric: "status.#{status}", event: event), 1
39
39
  metric_class.count cache_notifier_namespace(metric: 'called', event: event), 1
40
40
  end
41
41
 
@@ -45,18 +45,18 @@ module RestfulResource
45
45
  cache_status = event.payload[:cache_status]
46
46
 
47
47
  # Outputs log lines like:
48
- # sample#quotes_site.research_site_api.cache_hit=1
49
- # sample#quotes_site.research_site_api.api_v2_cap_derivatives.cache_hit=1
48
+ # count#quotes_site.research_site_api.cache_hit=1
49
+ # count#quotes_site.research_site_api.api_v2_cap_derivatives.cache_hit=1
50
50
  case cache_status
51
51
  when :fresh, :valid
52
- metric_class.sample cache_notifier_namespace(metric: 'cache_hit'), 1
53
- metric_class.sample cache_notifier_namespace(metric: 'cache_hit', event: event), 1
52
+ metric_class.count cache_notifier_namespace(metric: 'cache_hit'), 1
53
+ metric_class.count cache_notifier_namespace(metric: 'cache_hit', event: event), 1
54
54
  when :invalid, :miss
55
- metric_class.sample cache_notifier_namespace(metric: 'cache_miss'), 1
56
- metric_class.sample cache_notifier_namespace(metric: 'cache_miss', event: event), 1
55
+ metric_class.count cache_notifier_namespace(metric: 'cache_miss'), 1
56
+ metric_class.count cache_notifier_namespace(metric: 'cache_miss', event: event), 1
57
57
  when :unacceptable
58
- metric_class.sample cache_notifier_namespace(metric: 'cache_bypass'), 1
59
- metric_class.sample cache_notifier_namespace(metric: 'cache_bypass', event: event), 1
58
+ metric_class.count cache_notifier_namespace(metric: 'cache_bypass'), 1
59
+ metric_class.count cache_notifier_namespace(metric: 'cache_bypass', event: event), 1
60
60
  end
61
61
  end
62
62
  end
@@ -1,3 +1,3 @@
1
1
  module RestfulResource
2
- VERSION = '1.4.2'
2
+ VERSION = '1.4.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Santoro