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 +4 -4
- data/lib/yabeda/datadog/adapter.rb +1 -1
- data/lib/yabeda/datadog/metric.rb +9 -0
- data/lib/yabeda/datadog/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b49543194cd3175b871fd484e3229d871b00c8e4db917f92e4daca521fe8d1b7
|
4
|
+
data.tar.gz: 988f0cc5b082c73b65b50babee0f33d2199ac953ded5ebc31071738816be1306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de8a7150e9603a90213d78c825d7f9ece9ac85b68a01d4377c9a1790c49aaeb31b60ce8c43076072f76af3c9b12188439dcb3e48a1992380eaf0ee8941cbe86f
|
7
|
+
data.tar.gz: 91dde0602e17a69f3cc24cb913f7656e81c87ac146ff0229768c8bd6349dbc711ca0c79add0da6ea0ecd20337d7196723e954f71eadaaa464932967107ed6a6d
|
@@ -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)
|
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.
|
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-
|
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
|
-
|
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
|