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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b6db8e65d10c31f0ee741e06764621bb8da09c17212a1952e82539d13001b12
4
- data.tar.gz: 9a5e43559e1147a2f881b4d52a0a94853479e1585fa0dde228f8f769912e6b91
3
+ metadata.gz: dd2083f63e049817a3aa4437645a774b5a00384c29126aae64d1b7978d09e187
4
+ data.tar.gz: 39a7bbc6750a878f64bb4fa362896749cd86ceb75a39efbceec43f6a0d8156a8
5
5
  SHA512:
6
- metadata.gz: 8d7e63220cb4a41ebc70461f50054ee82590440f44970f11ca2ab4e758c584929ae5ec9d1a8347a94cc9c037b9a035b74247331bc2c21f284077dc261ba401c2
7
- data.tar.gz: b52c0c3facd07ab34664ee4955932bc1f50cbca56a231e970263d0d82d52cd7a3e5ef809b7f5e4f88404623c714967f688d72ae2d6a7ec0ffaf414d5308f7e0d
6
+ metadata.gz: c13f7be4e34bde0fe5dbea980036f8ebf3818fa6883b16b0751d57753158f12fcaaf25c2b6d9678062220515430232009728b877157332e922d052a82fabb12f
7
+ data.tar.gz: 5d848f32acd58beb81b90d367597be38db32bf8a52dc53f76d947acda79f8730ff69487fb1102fa5eb631fde80e5d0537921775f493d3b5b3625055a6eb21ed8
@@ -3,6 +3,7 @@ require 'meter/backends/udp'
3
3
  require 'meter/backends/statsd'
4
4
  require 'meter/backends/datadog'
5
5
  require 'meter/backends/json_log'
6
+ require 'meter/backends/logger'
6
7
  require 'meter/configure'
7
8
  require 'meter/mdc'
8
9
  require 'meter/metric/base'
@@ -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
@@ -2,7 +2,7 @@ module Meter
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
- TINY = 6
5
+ TINY = 7
6
6
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
7
7
  end
8
8
  end
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.6
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: 2018-12-21 00:00:00.000000000 Z
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