ffwd-google-cloud 0.4.1 → 0.4.2

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: 67ce27fdf5b4be025672e1f9976f65b8f0cf6b20
4
- data.tar.gz: 73692e2a3c6ed2f31cd7a1a282d447ecb122cc57
3
+ metadata.gz: 85933ad63b1c5d571fc088d5d36083a703b132c5
4
+ data.tar.gz: 7efaf4b8b585240dca680c11a18fa12a291ad3a8
5
5
  SHA512:
6
- metadata.gz: 05ee2f2a30305b29b0755b04b1ca591ba11e7d6121f3dfd0307ed5e730c0323b95f04663b234cdd18c776c578debbe390f22500061d78d808cdae51e89c0af10
7
- data.tar.gz: a826644b2b8c4a1ceb3a12ed50ebae350bd6c0bc77e71a0a8571264c31f8903a1ee661a3366c0d1a7136680939f7ab70ded31a2be53124ca2589a7f11fc2f06f
6
+ metadata.gz: 2d7b1e2c7190804535447aa2b3a6e41d78b040f7ad9c87cca55b8ce4d46f373329945392bb92a627adde052ed1cb6a14a57479f88cd1f7bd846846df4d7ce97d
7
+ data.tar.gz: f54fc5d8ca85a7345d281a897b6d4a4b8a394451e34033eff4c5f1c42a3efcba4198a720bd6c5391f8ead7eef7d45197c4cea221190bfc92acceecf051e20e5b
@@ -30,11 +30,11 @@ module FFWD::Plugin::GoogleCloud
30
30
 
31
31
  if seen.member?(d[:metric])
32
32
  dropped += 1
33
- next
33
+ next
34
34
  end
35
35
 
36
36
  seen.add(d[:metric])
37
- result << {:timeseriesDesc => make_desc(m), :point => make_point(m)}
37
+ result << {:timeseriesDesc => d, :point => make_point(m)}
38
38
  end
39
39
 
40
40
  [dropped, result]
@@ -50,13 +50,21 @@ module FFWD::Plugin::GoogleCloud
50
50
  end
51
51
 
52
52
  def self.make_key m
53
- what ||= m.attributes[:what]
54
- what ||= m.attributes["what"]
53
+ attributes = Hash[m.attributes]
55
54
 
56
- if what.nil?
57
- "#{CUSTOM_PREFIX}/#{m.key}"
55
+ entries = []
56
+
57
+ what ||= attributes.delete(:what)
58
+ what ||= attributes.delete("what")
59
+
60
+ entries << what unless what.nil?
61
+ entries += attributes.keys.sort.map(&:to_s)
62
+ entries = entries.join('.')
63
+
64
+ unless entries.empty?
65
+ "#{CUSTOM_PREFIX}/#{m.key}/#{entries}"
58
66
  else
59
- "#{CUSTOM_PREFIX}/#{m.key}.#{what}"
67
+ "#{CUSTOM_PREFIX}/#{m.key}"
60
68
  end
61
69
  end
62
70
 
@@ -16,7 +16,7 @@
16
16
  module FFWD
17
17
  module Plugin
18
18
  module GoogleCloud
19
- VERSION = "0.4.1"
19
+ VERSION = "0.4.2"
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffwd-google-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John-John Tedro
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.4.1
33
+ version: 0.4.2
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.4.1
40
+ version: 0.4.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement