prometheus_exporter 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/prometheus_exporter/metric/gauge.rb +8 -1
- data/lib/prometheus_exporter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90eab18dd3dce6c0862b9bc14bf42f905a2a06516dfb023a4a081ce1ecb9a5d3
|
4
|
+
data.tar.gz: 22fb28a7ab4f7dacfe28c1267b4158783d9c44de8bd5a798df122a6112b51090
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4adae339d6e3ddb430f1615aa6077a83fd87cc90aaed6eb2fd3c2e4392834c3864dcac22929825f46c55a8e45e3bf7b5228b852a09731925a9a03223de0cc04d
|
7
|
+
data.tar.gz: 53a1f43c7ebc8e5f7891d1784f5a41381c785beda2e0172bbc25202ee5a703c60bbab7c00d85f03c6bbe39f6dac4ef722a6959bae678b5e21da7325dc1d4f5fe
|
data/CHANGELOG
CHANGED
@@ -20,7 +20,14 @@ module PrometheusExporter::Metric
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def observe(value, labels = {})
|
23
|
-
|
23
|
+
if value.nil?
|
24
|
+
data.delete(labels)
|
25
|
+
else
|
26
|
+
if !(Numeric === value)
|
27
|
+
raise ArgumentError, 'value must be a number'
|
28
|
+
end
|
29
|
+
@data[labels] = value
|
30
|
+
end
|
24
31
|
end
|
25
32
|
|
26
33
|
def increment(labels = {}, value = 1)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prometheus_exporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|