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 +4 -4
- data/CHANGELOG.md +17 -1
- data/Gemfile.lock +2 -2
- data/lib/pliny/librato/metrics/backend.rb +6 -12
- data/lib/pliny/librato/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d70a0b565fba48c9b53ad27bc88b6e9beacd7f94
|
4
|
+
data.tar.gz: 1e40f86dcdf0316c8792b0f667b42994a06d2291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d35115fbe573b69129f382e8b4f827ea83d21bebdc8955b0b4ac095643f19b4d7eb9daf62706260c5983d6ec6df84a88822c3448662df040b6e513f3bdf6f65a
|
7
|
+
data.tar.gz: a710b8488472f98981542272dbb371911364a6f04e64ce4063f638f3bf6f1ef90111e14854c493e449f1f2fcfab0fd23886346632ff865f8a65b89ccdb95285c
|
data/CHANGELOG.md
CHANGED
@@ -1,2 +1,18 @@
|
|
1
|
-
|
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.
|
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.
|
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.
|
16
|
+
self.async.report(counts)
|
17
17
|
end
|
18
18
|
|
19
19
|
def report_measures(measures)
|
20
|
-
self.async.
|
20
|
+
self.async.report(measures)
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
24
|
-
::Librato::Metrics.submit(
|
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
|
33
|
+
def serialize(metrics)
|
40
34
|
metrics.reduce({}) do |mets, (k, v)|
|
41
|
-
mets[k] = { type:
|
35
|
+
mets[k] = { type: :gauge, value: v, source: source }
|
42
36
|
mets
|
43
37
|
end
|
44
38
|
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.
|
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-
|
12
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|