stackdriver 0.1.1 → 0.2.0

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: d268ba6aeffd176a06e4d633cd1ff2a6327ca605
4
- data.tar.gz: cf7472f5190c031cb57e86d7ed6f0ac7bfe997e2
3
+ metadata.gz: 45cccb2aaa57cee3afdbed410e598586906b0301
4
+ data.tar.gz: 8476945867c544898327da3b42b6afcae4d39b90
5
5
  SHA512:
6
- metadata.gz: 900042ba47b03d4465f5f6c9d976e4725009c29f1a2f94d5afd0df7fbdca60206527e89b738a438dc2c4f6aab4cc4595af2f3524cda092767ef7d64822b97d3f
7
- data.tar.gz: 00b27802d43030563af00b541763c4be50b41ba9bc25636d7cacadf87ae20524fcb35c4a81a4a867282b3adefc3286ad3feff5e3929e687d3ef4154e7e21e653
6
+ metadata.gz: 9bb5743ab4d515f2bd4d7ae8539bb9fffff3a091258a49a5614dafeb396b66095885bfbfab4065675a78785238e7ea82f95448f6910624803d6fe14ead6ecf78
7
+ data.tar.gz: 5007e74fbc395038bb504e83350a1b452ce2d2abc446cec62f35c8ae344af8b55f16569c3932eb56e6cd15157f84a7ad3afbe515e783f08587069be13f3c579b
checksums.yaml.gz.asc CHANGED
@@ -1,12 +1,11 @@
1
1
  -----BEGIN PGP SIGNATURE-----
2
- Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
3
- Comment: GPGTools - http://gpgtools.org
2
+ Version: GnuPG v1.4.12 (GNU/Linux)
4
3
 
5
- iQEbBAABCgAGBQJRh+aBAAoJELb2/9DjtYBv3zoH8wfhe9NhKNl+sq7i7oNdjfuP
6
- 49zhdcqOYtZEaTqvQoQ/PnDpv9Zeq/hfg+tL4aZB9KVz6sQgCuDnA9cOrg0NJLXu
7
- nwH6JHl2emJkUuS4GX4ErjhxpGmq7EhlLJqNustnZq9xBbO6DzbI8we84FjNJ5Sn
8
- dvFLGjC7lQFuVXevTsjp3n5guR2kQKHujSlbjMKtzb9I+406/iRgx+ys9RN0Vkdy
9
- ikODRmi5YMvpuJxhVvtuSty14fiLV/pi9YOqPpMjRaPJrHyr9TEBpUFF9TJ5abpd
10
- dHhBAIsEUuY0aGwE5/JcrXDdaft5mk/GuHdWd9Scc0zRIT12cyCOwRl2sTcbBw==
11
- =dmiZ
4
+ iQEcBAABAgAGBQJSi/dWAAoJEP5F5V2hilTWHgEH/j5D4+0Lu/aglJbnYljwabXV
5
+ g2/iCJnlgP6uecgZ/ZOnuZ9b8CcE4B9wK+XsHbpqJVO0UiX6KRAJ9aYVvH56JvVL
6
+ M6QwPIngUKR8HIkaJ4ODs8Wy0dh3Ussetjnk8OtemArueuq4naOlNogQrcdpm0Gt
7
+ HR5GYMt9NGY8HsaBA6A7yOqHdG5z+21m9Xvz3+ECt2zvKzL+49yOeOxUqG5G1H8/
8
+ VQPCAtUWVLLI/sy+wsLAkMppFcX3bJ5RHPhn/DDGlQjN2emfuKrdpSLGKHuhtAzr
9
+ wbRtnVoNe/ZQDDQEaeLixPHAfKqrWbOOyrhw2DjLINUApnYRgpepyIjUU+FqmIk=
10
+ =pNkb
12
11
  -----END PGP SIGNATURE-----
data.tar.gz.asc CHANGED
@@ -1,12 +1,11 @@
1
1
  -----BEGIN PGP SIGNATURE-----
2
- Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
3
- Comment: GPGTools - http://gpgtools.org
2
+ Version: GnuPG v1.4.12 (GNU/Linux)
4
3
 
5
- iQEcBAABCgAGBQJRh+aBAAoJELb2/9DjtYBv97QH/31Pn6pYVSqZJ4jiNDOgHpVm
6
- J6M1itqUqEHcwcY2xWHTaiL6hiPV+xno9C2kAUUHFYF3AR15aW11C8ClDGJAYI6b
7
- /MzsthPUfhLkmXPUz+7jUbhTlFRUQ0uEMwsQs78w05vQRZ6IyIWXOQWFnJA65J4J
8
- KvxwePqitXidosXlLzCNGNkkjbffx0kjVCWLWP5szQGe6zw2+qEz8PY7nUg/vCiy
9
- 7I1qKz1yspPlSHMu5mwhnMj4zaJiQgDSN7dJLkxEcUgzJoRHNjl+ZJI3oQilQnSR
10
- +CttvsYl0DZOaQdtcQtfAq5u1ha91q9Uc3uYergeXP6aQboRcq6uL1K4Q7fDv2Q=
11
- =M3ZC
4
+ iQEcBAABAgAGBQJSi/dTAAoJEP5F5V2hilTWsOUIALaRdak6Ouh5Hks6m1/H9Du9
5
+ KljVXqXKwNwChG+7G8iEjF+z+XSTYcc8s7NoGOpdv61ydCHVJb9LNNmA9hshJFNE
6
+ Jko4+Iroe/bI6Vd1nq8sudWSslGx1LrPaJD4emCmLn0XuuUX1hh7VAo+500afy2D
7
+ 5Qbc9ocpTe3q9f/b4/++7g1mTL+IlnSR+bCKwpfb5thNfDhZgf4PVVsf5cCs4qDg
8
+ 3bsp3Mx8LYTozo4t4cjEotzmQND7/ROpsY/VM6HZAq2JAAiM7Y77OGg0NKzf2ITN
9
+ Ofq5xOZxfwY1R87k/NXvDN3GJ85HMm21lR0/G5cPNKy8ok/y6MA0zCGoMzhGnYY=
10
+ =oyQi
12
11
  -----END PGP SIGNATURE-----
data/lib/stackdriver.rb CHANGED
@@ -8,8 +8,8 @@ module StackDriver
8
8
  @api_key = api_key
9
9
  end
10
10
 
11
- def self.send_metric name, value, time
12
- msg = build_message name, value, time
11
+ def self.send_metric name, value, time, instance=''
12
+ msg = build_message name, value, time, instance
13
13
  post MultiJson.dump(msg)
14
14
  end
15
15
 
@@ -31,9 +31,9 @@ module StackDriver
31
31
  end
32
32
  end
33
33
 
34
- def self.build_message name, value, time
34
+ def self.build_message name, value, time, instance=''
35
35
  data_point = {'name' => name, 'value' => value, 'collected_at' => time}
36
-
36
+ data_point.merge!('instance' => instance) unless instance.empty?
37
37
  {'timestamp' => Time.now.to_i, 'customer_id' => @customer_id,
38
38
  'proto_version' => '1', 'data' => data_point}
39
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant T. Olson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-06 00:00:00.000000000 Z
11
+ date: 2013-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  requirements: []
55
55
  rubyforge_project:
56
- rubygems_version: 2.0.3
56
+ rubygems_version: 2.0.6
57
57
  signing_key:
58
58
  specification_version: 4
59
59
  summary: Send StackDriver custom metrics
metadata.gz.asc CHANGED
@@ -1,12 +1,11 @@
1
1
  -----BEGIN PGP SIGNATURE-----
2
- Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
3
- Comment: GPGTools - http://gpgtools.org
2
+ Version: GnuPG v1.4.12 (GNU/Linux)
4
3
 
5
- iQEcBAABCgAGBQJRh+aBAAoJELb2/9DjtYBvlPUIALli3L6mjZSMCOK8QA9pNjKp
6
- PwXkM8Wg+FeVSgwK61Otm8rY+NbsaF/vA0tyscAzUwRKu3YBT16wBgVvrtVKHA6a
7
- Vr4HJVG48JesqDON9CAL2i7PzhlGigtFy+3oOorWErMAvgLIKvHthI2ecsB4I+74
8
- qyLLsBbaEfVKcL9c/12pV/A27zWnWO3E3CMseJ9hXzIAs4SEKIRlURxPN25d0JvG
9
- IcQhvnUSidLPeF9eSv5ndWPKwB6HDF9/VzwOiMH1e1DlUBSJEyRZouxQNm6HmaNr
10
- grmRy+41Pph+obU9IhnljcQjh4BnYfNzWgRVHyg+dG3ZhdRGl3gzba0YaUBGQrk=
11
- =oHRe
4
+ iQEcBAABAgAGBQJSi/dPAAoJEP5F5V2hilTWrkwIAJPzJ3EGd1++cCdO/Z+G+CKK
5
+ OY1RmA6sP4x8nD+XFQxdPASHHXN9Qto6/dtQTnD5nStJxiGF9mh7f+K2vu/3Vq2u
6
+ ugqlA/jE0WkRzgQGZF6jGUyzjfOkGl4CTuFoNV2a/D+s86i4JOw74tt1pLs42Fvf
7
+ AMUYN1F//Dlqg1psDUPMW8A/QX1T+eb8RbTTUQSw6NTanUuLlD1YlJ39iWDI+aMz
8
+ omc1y6EJzmBtjBMY+PcLWqJnM/tRpsBJODJhbK7gx2j4X3fbwiOX7ZhDoy4CJyka
9
+ VFwyUjvgNc7F4YzZwyDD4RD6pSxevJIp54yg1EyQmpejXg4y5ulGLLHbit8adu0=
10
+ =26D/
12
11
  -----END PGP SIGNATURE-----