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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61f6c4ee8ed7b6a57307fc9c5af44f492375ce2e4c07a8995d0877e1142f95bb
4
- data.tar.gz: fcfe58d17d6e6ec8e2e6c0421a78426b18822483958445bec239a9c4358cb0df
3
+ metadata.gz: 90eab18dd3dce6c0862b9bc14bf42f905a2a06516dfb023a4a081ce1ecb9a5d3
4
+ data.tar.gz: 22fb28a7ab4f7dacfe28c1267b4158783d9c44de8bd5a798df122a6112b51090
5
5
  SHA512:
6
- metadata.gz: a15eaf6626b0036228ffaccb6e8ea561cbf5d4eb9286973864a1eae473190b8375cf8a1431f307eef32f3815aad9a70bd9275c399b7daad0f77abf924dd14a2e
7
- data.tar.gz: 7cb71d3a29cc23b709b11a9cdb0a46452c9b538b84ee6b50b6711d26fe032db6a420e8d2f3494dc4024cd70304d6a35a3af0c4814ea49c810869003672292648
6
+ metadata.gz: 4adae339d6e3ddb430f1615aa6077a83fd87cc90aaed6eb2fd3c2e4392834c3864dcac22929825f46c55a8e45e3bf7b5228b852a09731925a9a03223de0cc04d
7
+ data.tar.gz: 53a1f43c7ebc8e5f7891d1784f5a41381c785beda2e0172bbc25202ee5a703c60bbab7c00d85f03c6bbe39f6dac4ef722a6959bae678b5e21da7325dc1d4f5fe
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.4.2 - 30-11-2018
2
+
3
+ - Fix/Feature: setting a Gauge to nil will remove Gauge (setting to non numeric will raise)
4
+
1
5
  0.4.0 - 23-10-2018
2
6
 
3
7
  - Feature: histogram support
@@ -20,7 +20,14 @@ module PrometheusExporter::Metric
20
20
  end
21
21
 
22
22
  def observe(value, labels = {})
23
- @data[labels] = value
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)
@@ -1,3 +1,3 @@
1
1
  module PrometheusExporter
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
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.1
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-22 00:00:00.000000000 Z
11
+ date: 2018-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler