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 +4 -4
- data/lib/restful_resource/instrumentation.rb +12 -12
- data/lib/restful_resource/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56a70ef576d82b815645f5293fc6fcac6aaa2de1
|
4
|
+
data.tar.gz: 4d4cb903d304ab10a2cca3f803ad51700719db85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
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.
|
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
|
-
#
|
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.
|
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
|
-
#
|
49
|
-
#
|
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.
|
53
|
-
metric_class.
|
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.
|
56
|
-
metric_class.
|
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.
|
59
|
-
metric_class.
|
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
|