meter 1.2.6 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/meter.rb +1 -0
- data/lib/meter/backends/logger.rb +21 -0
- data/lib/meter/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd2083f63e049817a3aa4437645a774b5a00384c29126aae64d1b7978d09e187
|
4
|
+
data.tar.gz: 39a7bbc6750a878f64bb4fa362896749cd86ceb75a39efbceec43f6a0d8156a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c13f7be4e34bde0fe5dbea980036f8ebf3818fa6883b16b0751d57753158f12fcaaf25c2b6d9678062220515430232009728b877157332e922d052a82fabb12f
|
7
|
+
data.tar.gz: 5d848f32acd58beb81b90d367597be38db32bf8a52dc53f76d947acda79f8730ff69487fb1102fa5eb631fde80e5d0537921775f493d3b5b3625055a6eb21ed8
|
data/lib/meter.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
module Meter
|
2
|
+
module Backends
|
3
|
+
class Logger < ::Meter::Backends::Base
|
4
|
+
def self.supported_metrics
|
5
|
+
[:log]
|
6
|
+
end
|
7
|
+
|
8
|
+
def convert_to_backend_format(metric)
|
9
|
+
{
|
10
|
+
statname: metric.name,
|
11
|
+
metric_type: metric.type,
|
12
|
+
metric_value: metric.value
|
13
|
+
}.merge(metric.data).merge(metric.tags)
|
14
|
+
end
|
15
|
+
|
16
|
+
def output_data(data)
|
17
|
+
::Meter.config.logger.info data
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/meter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bukowskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: useragent
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/meter/backends/base.rb
|
108
108
|
- lib/meter/backends/datadog.rb
|
109
109
|
- lib/meter/backends/json_log.rb
|
110
|
+
- lib/meter/backends/logger.rb
|
110
111
|
- lib/meter/backends/statsd.rb
|
111
112
|
- lib/meter/backends/udp.rb
|
112
113
|
- lib/meter/configuration.rb
|