prometheus_exporter 0.4.15 → 0.4.16
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/base.rb +4 -0
- data/lib/prometheus_exporter/metric/counter.rb +5 -1
- data/lib/prometheus_exporter/metric/gauge.rb +5 -1
- data/lib/prometheus_exporter/metric/histogram.rb +4 -0
- data/lib/prometheus_exporter/metric/summary.rb +5 -1
- data/lib/prometheus_exporter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f71a3c031cd843aba70a3fb4692b73507c7ad7b1256e1cf5b1dbb264cebf73d3
|
4
|
+
data.tar.gz: 0fbc4a8c24a2ce6d95e6aa315938fc0f4be46c8e769db49397fcbfd2b3dd81f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 760279a05df24ae8b06d11bed36d4121afe223020bd36a4cd8f945195c402313aea6c58c81b1f85c0d40b64812af31a37e1537ecc14573b435830311c0415cfd
|
7
|
+
data.tar.gz: cc36f5859f8195000899e8b2bb066d9bf03698a8280e532231fda9e4bd7756d478fb0d5bd7c4e87dd34bb0a73f88485b198fd53f8c8bf8709c761fdcce41347c
|
data/CHANGELOG
CHANGED
@@ -6,13 +6,17 @@ module PrometheusExporter::Metric
|
|
6
6
|
|
7
7
|
def initialize(name, help)
|
8
8
|
super
|
9
|
-
|
9
|
+
reset!
|
10
10
|
end
|
11
11
|
|
12
12
|
def type
|
13
13
|
"counter"
|
14
14
|
end
|
15
15
|
|
16
|
+
def reset!
|
17
|
+
@data = {}
|
18
|
+
end
|
19
|
+
|
16
20
|
def metric_text
|
17
21
|
@data.map do |labels, value|
|
18
22
|
"#{prefix(@name)}#{labels_text(labels)} #{value}"
|
@@ -6,7 +6,7 @@ module PrometheusExporter::Metric
|
|
6
6
|
|
7
7
|
def initialize(name, help)
|
8
8
|
super
|
9
|
-
|
9
|
+
reset!
|
10
10
|
end
|
11
11
|
|
12
12
|
def type
|
@@ -19,6 +19,10 @@ module PrometheusExporter::Metric
|
|
19
19
|
end.join("\n")
|
20
20
|
end
|
21
21
|
|
22
|
+
def reset!
|
23
|
+
@data = {}
|
24
|
+
end
|
25
|
+
|
22
26
|
def observe(value, labels = {})
|
23
27
|
if value.nil?
|
24
28
|
data.delete(labels)
|
@@ -10,12 +10,16 @@ module PrometheusExporter::Metric
|
|
10
10
|
|
11
11
|
def initialize(name, help, opts = {})
|
12
12
|
super(name, help)
|
13
|
+
reset!
|
14
|
+
@quantiles = opts[:quantiles] || DEFAULT_QUANTILES
|
15
|
+
end
|
16
|
+
|
17
|
+
def reset!
|
13
18
|
@buffers = [{}, {}]
|
14
19
|
@last_rotated = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
15
20
|
@current_buffer = 0
|
16
21
|
@counts = {}
|
17
22
|
@sums = {}
|
18
|
-
@quantiles = opts[:quantiles] || DEFAULT_QUANTILES
|
19
23
|
end
|
20
24
|
|
21
25
|
def type
|