pliny-librato 0.2.0 → 0.3.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: 819e9aba7d88aaa273c9f4eea4d349712502ae07
4
- data.tar.gz: 07e5ca4178d3b9f42e991328932f30bd340d851a
3
+ metadata.gz: d70a0b565fba48c9b53ad27bc88b6e9beacd7f94
4
+ data.tar.gz: 1e40f86dcdf0316c8792b0f667b42994a06d2291
5
5
  SHA512:
6
- metadata.gz: c90b369cbc07f97e345f2b8772cf2b72ac222da997972b71261fda2b6c6f726a22aa0489f77d057a0a20f0bb62f85aec7913bb02e969c2324216749a939a593f
7
- data.tar.gz: f8b408bc4e582033a7adb33b91abc5121f73e8f12990d09692a5a66dd502419831d994f284fd00b277da4cb685a234f6e938d8b002a6f6afcf04b65b96b0c970
6
+ metadata.gz: d35115fbe573b69129f382e8b4f827ea83d21bebdc8955b0b4ac095643f19b4d7eb9daf62706260c5983d6ec6df84a88822c3448662df040b6e513f3bdf6f65a
7
+ data.tar.gz: a710b8488472f98981542272dbb371911364a6f04e64ce4063f638f3bf6f1ef90111e14854c493e449f1f2fcfab0fd23886346632ff865f8a65b89ccdb95285c
data/CHANGELOG.md CHANGED
@@ -1,2 +1,18 @@
1
- **0.2.0**
1
+ Change Log
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## 0.3.0
10
+
11
+ ### Changed
12
+
13
+ - All metrics sent to librato will be reported as gauges. This means that
14
+ `Pliny::Metrics.count` will be a gauge, to provide compatiblity with l2met
15
+ "count#" entries, which are also submitted as gauges.
16
+
17
+ ## 0.2.0
2
18
  - Catch and report errors in async calls to the Librato API
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pliny-librato (0.1.0)
4
+ pliny-librato (0.2.0)
5
5
  concurrent-ruby (~> 1.0)
6
6
  librato-metrics (~> 2.0)
7
7
  pliny (>= 0.20.0)
@@ -34,7 +34,7 @@ GEM
34
34
  minitest (5.10.1)
35
35
  multi_json (1.12.1)
36
36
  multipart-post (2.0.0)
37
- pliny (0.20.0)
37
+ pliny (0.20.1)
38
38
  activesupport (~> 4.1, >= 4.1.0)
39
39
  http_accept (~> 0.1, >= 0.1.5)
40
40
  multi_json (~> 1.9, >= 1.9.3)
@@ -13,21 +13,15 @@ module Pliny::Librato
13
13
  end
14
14
 
15
15
  def report_counts(counts)
16
- self.async._report_counts(counts)
16
+ self.async.report(counts)
17
17
  end
18
18
 
19
19
  def report_measures(measures)
20
- self.async._report_measures(measures)
20
+ self.async.report(measures)
21
21
  end
22
22
 
23
- def _report_counts(counts)
24
- ::Librato::Metrics.submit(expand(:counter, counts))
25
- rescue => error
26
- Pliny::ErrorReporters.notify(error)
27
- end
28
-
29
- def _report_measures(measures)
30
- ::Librato::Metrics.submit(expand(:gauge, measures))
23
+ def report(metrics)
24
+ ::Librato::Metrics.submit(serialize(metrics))
31
25
  rescue => error
32
26
  Pliny::ErrorReporters.notify(error)
33
27
  end
@@ -36,9 +30,9 @@ module Pliny::Librato
36
30
 
37
31
  attr_reader :librato_client, :source
38
32
 
39
- def expand(type, metrics)
33
+ def serialize(metrics)
40
34
  metrics.reduce({}) do |mets, (k, v)|
41
- mets[k] = { type: type, value: v, source: source }
35
+ mets[k] = { type: :gauge, value: v, source: source }
42
36
  mets
43
37
  end
44
38
  end
@@ -1,5 +1,5 @@
1
1
  module Pliny
2
2
  module Librato
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pliny-librato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Appleton
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-12-07 00:00:00.000000000 Z
12
+ date: 2016-12-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby