mettric 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mettric/client.rb +4 -0
- data/lib/mettric/mettric.rb +1 -0
- data/lib/mettric/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: e7965486fe39533c7ae113b0a6614ff619deec5c
|
4
|
+
data.tar.gz: 3088bd7cadff0c2f30da5daeaa8b6220ca5d7925
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 516155e541c687ed76d4d28fd0465919a9fc0968a23e0f31c58bf0a9b7486028acac21e1d7ec077f25dd8f5eaf20dcee24ff283f5dd240309f918c5ec0ae59c1
|
7
|
+
data.tar.gz: f1f88f700f4dfc9bd3b6211511939e3bab2c829761616b67ed5a1b9607e24bddba2758d10eff65d4a5e7e95e58660524e378adcfef6d29b040e44b37ec9bb3ca
|
data/lib/mettric/client.rb
CHANGED
@@ -39,6 +39,8 @@ class Mettric::Client
|
|
39
39
|
|
40
40
|
def <<(payload)
|
41
41
|
@riemann.tcp << standardize_payload(payload)
|
42
|
+
rescue => e
|
43
|
+
@riemann.tcp << { service: 'Mettric error', description: e.to_s }
|
42
44
|
end
|
43
45
|
|
44
46
|
def [](*args)
|
@@ -58,6 +60,8 @@ class Mettric::Client
|
|
58
60
|
def standardize_payload(payload)
|
59
61
|
out = payload.symbolize_keys
|
60
62
|
raise Mettric::MissingService, out if out[:service].blank?
|
63
|
+
out[:tags] ||= []
|
64
|
+
out[:tags] << 'mettric'
|
61
65
|
out[:host] = host
|
62
66
|
out[:service] = "#{app}.#{out[:service]}"
|
63
67
|
out
|
data/lib/mettric/mettric.rb
CHANGED
data/lib/mettric/version.rb
CHANGED