ffwd-google-cloud 0.4.3 → 0.4.4

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: 2460bbc3a9e1c03e415c76926df07e8fb7f1f03a
4
- data.tar.gz: 4c8c48826dde0239a18b0f50aa15342420a4d5da
3
+ metadata.gz: 0de09b03adb0d9ba7a5d7be850f0c69eb9eefdbf
4
+ data.tar.gz: e7286a3bcf680bbb58e8ad7a4a42dbff9fad20d6
5
5
  SHA512:
6
- metadata.gz: f209e4155c96938adc579c63eb0fd8ccdf05b9f10eab55139f4c541dfd47db23bdf7a5d8f5a8795a863932b1b2cd63c1911f747dc3b611e0415813dc0f7995d3
7
- data.tar.gz: 899ee149a5e79621a90ca817b9d79446784f21f7c38bfcd197f2e25817ca05ce5e1f8097566d3fcdb05ea1d158de6e8c577057e2044116add5f4011a42b71754
6
+ metadata.gz: 4f3c4c045aa77ae2bdd1e02caaeeb7acb130732ccddaa86a80830bbd167cafa6df73fa5d65cb43349c075a438d599f0886468f266bb05b234dcd7616dc038f5d
7
+ data.tar.gz: a4696557e9adae619a85089755d74eeaff55100d2a1cc0cb0e056b0ba40d0fb214c923e8865a5480f46ba9665e6c5c501b24aa6bb80eb3ba1f723f3682665bdf
@@ -33,12 +33,14 @@ module FFWD::Plugin::GoogleCloud
33
33
  buffer.each do |m|
34
34
  d = make_desc(m)
35
35
 
36
- if seen.member?(d[:metric])
36
+ seen_key = [d[:metric], d[:labels].map{|k, v| [k, v]}.sort].hash
37
+
38
+ if seen.member?(seen_key)
37
39
  dropped += 1
38
40
  next
39
41
  end
40
42
 
41
- seen.add(d[:metric])
43
+ seen.add(seen_key)
42
44
  result << {:timeseriesDesc => d, :point => make_point(m)}
43
45
  end
44
46
 
@@ -63,13 +65,14 @@ module FFWD::Plugin::GoogleCloud
63
65
  what ||= attributes.delete("what")
64
66
 
65
67
  entries << what unless what.nil?
66
- entries += attributes.keys.sort.map(&:to_s)
67
68
  entries = entries.join('.')
68
69
 
70
+ hash = attributes.keys.sort.hash.abs.to_s(32)
71
+
69
72
  unless entries.empty?
70
- "#{CUSTOM_PREFIX}/#{m.key}/#{entries}"
73
+ "#{CUSTOM_PREFIX}/#{m.key}/#{entries}-#{hash}"
71
74
  else
72
- "#{CUSTOM_PREFIX}/#{m.key}"
75
+ "#{CUSTOM_PREFIX}/#{m.key}-#{other_keys}"
73
76
  end
74
77
  end
75
78
 
@@ -16,7 +16,7 @@
16
16
  module FFWD
17
17
  module Plugin
18
18
  module GoogleCloud
19
- VERSION = "0.4.3"
19
+ VERSION = "0.4.4"
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.3
4
+ version: 0.4.4
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.3
33
+ version: 0.4.4
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.3
40
+ version: 0.4.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement