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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e90960d6ac1ea5b24dff5c10434738169fb53e11
4
- data.tar.gz: 47550cc9c25e78f8b382ff31533c0b97fcd5c0c7
3
+ metadata.gz: e7965486fe39533c7ae113b0a6614ff619deec5c
4
+ data.tar.gz: 3088bd7cadff0c2f30da5daeaa8b6220ca5d7925
5
5
  SHA512:
6
- metadata.gz: 707d923b1083528530c289c438b9bdf0873f6b1edafa3b2eb5484f740546eca990b00129b13cc8a287980ac969e8290fecbf7ae10806ac74e542fdf64024bd7b
7
- data.tar.gz: 638b91f7fad2d79a057d1e9fe2a238f310341cf8e3be00109c72d6348da3bf353df1275916aa2542f9f97420d18ec43b8d03855056bebf8ceda9f41a0ce4b651
6
+ metadata.gz: 516155e541c687ed76d4d28fd0465919a9fc0968a23e0f31c58bf0a9b7486028acac21e1d7ec077f25dd8f5eaf20dcee24ff283f5dd240309f918c5ec0ae59c1
7
+ data.tar.gz: f1f88f700f4dfc9bd3b6211511939e3bab2c829761616b67ed5a1b9607e24bddba2758d10eff65d4a5e7e95e58660524e378adcfef6d29b040e44b37ec9bb3ca
@@ -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
@@ -13,6 +13,7 @@ class Mettric
13
13
  end
14
14
 
15
15
  def self.track(payload)
16
+ return false unless @config
16
17
  ensure_worker_running
17
18
  QUEUE << payload
18
19
  QUEUE.size
@@ -1,3 +1,3 @@
1
1
  class Mettric
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mettric
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns