yabeda-datadog 0.3.2 → 0.3.3

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: d19ca4de5083d19647d70c84ac48e8192c30107f704de5e884605184566878de
4
- data.tar.gz: aad24d5f83a5431a47f561402bcbf1f0dc3671169b6e21d9b2fa3fce1dfbed09
3
+ metadata.gz: b49543194cd3175b871fd484e3229d871b00c8e4db917f92e4daca521fe8d1b7
4
+ data.tar.gz: 988f0cc5b082c73b65b50babee0f33d2199ac953ded5ebc31071738816be1306
5
5
  SHA512:
6
- metadata.gz: 9120fe159229915dd474c9f1dcda45b84874a6652e85c743b704590dcac6912a34d4e91cb519e322ab413645ede4f3642af8a37ce76c3066e5349103b02b2130
7
- data.tar.gz: bc3b9ba60f41c04e621014dc6d808101846cad8e4274d63940a627c48e3a9e14dba27d217f1ff3d26ba643910ca7057f3b4587c645c9f8d0b28f7233d0b35a36
6
+ metadata.gz: de8a7150e9603a90213d78c825d7f9ece9ac85b68a01d4377c9a1790c49aaeb31b60ce8c43076072f76af3c9b12188439dcb3e48a1992380eaf0ee8941cbe86f
7
+ data.tar.gz: 91dde0602e17a69f3cc24cb913f7656e81c87ac146ff0229768c8bd6349dbc711ca0c79add0da6ea0ecd20337d7196723e954f71eadaaa464932967107ed6a6d
@@ -19,7 +19,7 @@ module Yabeda
19
19
  end
20
20
 
21
21
  def register_counter!(counter)
22
- enqueue_register(Metric.new(counter, "count"))
22
+ enqueue_register(Metric.new(counter, "rate"))
23
23
  end
24
24
 
25
25
  def perform_counter_increment!(counter, tags, increment)
@@ -6,6 +6,9 @@ module Yabeda
6
6
  module Datadog
7
7
  # = Internal adapter representation of metrics
8
8
  class Metric
9
+ SECOND = 1
10
+ DEFAULT_FLUSH_INTERVAL = SECOND * 10
11
+
9
12
  def initialize(metric, type, overides = {})
10
13
  @metric = metric
11
14
  @type = type
@@ -22,6 +25,7 @@ module Yabeda
22
25
  short_name: name,
23
26
  unit: unit,
24
27
  per_unit: per_unit,
28
+ statsd_interval: statsd_interval,
25
29
  }
26
30
  end
27
31
 
@@ -45,6 +49,11 @@ module Yabeda
45
49
  overides.fetch(:per_unit, Unit.find(metric.per))
46
50
  end
47
51
 
52
+ # Datadog API argument
53
+ def statsd_interval
54
+ DEFAULT_FLUSH_INTERVAL if type == "rate"
55
+ end
56
+
48
57
  # Update metric metadata
49
58
  def update(api)
50
59
  api.update_metadata(name, metadata)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module Datadog
5
- VERSION = "0.3.2"
5
+ VERSION = "0.3.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yabeda-datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Shvetsov <@shvetsovdm>
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-13 00:00:00.000000000 Z
11
+ date: 2019-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config
@@ -180,7 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  - !ruby/object:Gem::Version
181
181
  version: '0'
182
182
  requirements: []
183
- rubygems_version: 3.0.1
183
+ rubyforge_project:
184
+ rubygems_version: 2.7.6
184
185
  signing_key:
185
186
  specification_version: 4
186
187
  summary: DataDog adapter for reporting metrics from Yabeda suite