meter 0.1.4 → 0.1.5

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: 9c3ca18e1a5edff90911f551faed20d4c682111d
4
- data.tar.gz: deefb21a1dc542f56567b90391b3586a19c91bcc
3
+ metadata.gz: 688dc1d6ce53a1ec04070fa4ad47ae7a98bae4a5
4
+ data.tar.gz: e14023b80be493860f28bd39dbdf06b871db639c
5
5
  SHA512:
6
- metadata.gz: d26ca5e9ce1f4642ad6442ecba7521cf88d9d33308d80b720403c5ebce28c4b3ff92e401f30891a79e2105d0396674004d5657fbaec7e1863a7c2ea5d603fe38
7
- data.tar.gz: 4254c1b2e5786ae8e47255c6a0cb59b485689c46bc54126132e763e53f73c543949d410035f145548563e9a11c8113b0888708083e87216996f42dc72356812d
6
+ metadata.gz: 32ba671175cdd0fc8986e237ec9183c2c1692274166bb7443c80d27e64f39037d0f4a0eca2c50eadd146a3e47d7361f8e87f3a10047050cc6f449646beb96edc
7
+ data.tar.gz: 8d06e1fd962172fe08c908f3239d27b1e2a74c653fc07e2f3662894116044145c0b55f5eb4bc64c5f1b1f95aec7842d0a1990bd7866f7142fe58703324ff81f4
data/lib/meter/backend.rb CHANGED
@@ -8,7 +8,7 @@ module Meter
8
8
 
9
9
  def initialize(host = '127.0.0.1', port = 8125)
10
10
  @host, @port = host, port
11
- @prefix = "#{::Meter.config.namespace}."
11
+
12
12
  @socket = UDPSocket.new
13
13
  end
14
14
 
@@ -43,8 +43,9 @@ module Meter
43
43
  return unless sample_rate == 1 or rand < sample_rate
44
44
  stat = stat.to_s.gsub('::', '.').tr(':|@', '_')
45
45
  rate = "|@#{sample_rate}" unless sample_rate == 1
46
- tags = "|##{Array(options[:tags]).join(",")}" if options[:tags]
47
- send_to_socket "#{@prefix}#{stat}:#{delta}|#{type}#{rate}#{tags}"
46
+ app_tag = ["app:#{::Meter.config.namespace}"]
47
+ tags = "|##{(Array(options[:tags]) + app_tag).join(",")}"
48
+ send_to_socket "#{stat}:#{delta}|#{type}#{rate}#{tags}"
48
49
  end
49
50
 
50
51
  def send_to_socket(message)
data/lib/meter/version.rb CHANGED
@@ -2,7 +2,7 @@ module Meter
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 4
5
+ TINY = 5
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bukowskis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-10 00:00:00.000000000 Z
11
+ date: 2015-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec