Skip to content

Commit ce40b9d

Browse files
committed
Bump to v3.4.2
1 parent 2af8d69 commit ce40b9d

File tree

9 files changed

+145
-30
lines changed

9 files changed

+145
-30
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Copyright (c) 2016,2017 Ilya Khaprov <<[email protected]>>.
66

7-
__Version:__ 3.4.1
7+
__Version:__ 3.4.2
88

99
[![Hex.pm](https://img.shields.io/hexpm/v/prometheus.svg?maxAge=2592000?style=plastic)](https://hex.pm/packages/prometheus)
1010
[![Hex.pm](https://img.shields.io/hexpm/dt/prometheus.svg?maxAge=2592000)](https://hex.pm/packages/prometheus)

doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Copyright (c) 2016,2017 Ilya Khaprov <<[email protected]>>.
66

7-
__Version:__ 3.4.1
7+
__Version:__ 3.4.2
88

99
[![Hex.pm](https://img.shields.io/hexpm/v/prometheus.svg?maxAge=2592000?style=plastic)](https://hex.pm/packages/prometheus)
1010
[![Hex.pm](https://img.shields.io/hexpm/dt/prometheus.svg?maxAge=2592000)](https://hex.pm/packages/prometheus)

doc/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@copyright 2016,2017 Ilya Khaprov <<[email protected]>>.
22
@title Prometheus.io client for Erlang
3-
@version 3.4.1
3+
@version 3.4.2
44

55
@doc
66
[![Hex.pm](https://img.shields.io/hexpm/v/prometheus.svg?maxAge=2592000?style=plastic)](https://hex.pm/packages/prometheus)

doc/prometheus_collector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
A collector for a set of metrics.
1010

11-
__This module defines the `prometheus_collector` behaviour.__<br /> Required callback functions: `collect_mf/2`, `collect_metrics/2`, `deregister_cleanup/1`.
11+
__This module defines the `prometheus_collector` behaviour.__<br /> Required callback functions: `collect_mf/2`, `deregister_cleanup/1`.
1212

1313
<a name="description"></a>
1414

doc/prometheus_model_helpers.md

Lines changed: 133 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,46 @@ Probably will be used with [`prometheus_collector`](prometheus_collector.md).
2020

2121

2222

23+
### <a name="type-buckets">buckets()</a> ###
24+
25+
26+
<pre><code>
27+
buckets() = [{<a href="prometheus_buckets.md#type-bucket_bound">prometheus_buckets:bucket_bound()</a>, non_neg_integer()}, ...]
28+
</code></pre>
29+
30+
31+
32+
33+
### <a name="type-counter">counter()</a> ###
34+
35+
36+
<pre><code>
37+
counter() = <a href="#type-value">value()</a> | {<a href="#type-value">value()</a>} | {<a href="#type-labels">labels()</a>, <a href="#type-value">value()</a>}
38+
</code></pre>
39+
40+
41+
42+
43+
### <a name="type-gauge">gauge()</a> ###
44+
45+
46+
<pre><code>
47+
gauge() = <a href="#type-value">value()</a> | {<a href="#type-value">value()</a>} | {<a href="#type-labels">labels()</a>, <a href="#type-value">value()</a>}
48+
</code></pre>
49+
50+
51+
52+
53+
### <a name="type-histogram">histogram()</a> ###
54+
55+
56+
<pre><code>
57+
histogram() = {<a href="#type-buckets">buckets()</a>, non_neg_integer(), <a href="#type-value">value()</a>} | {<a href="#type-labels">labels()</a>, <a href="#type-buckets">buckets()</a>, non_neg_integer(), <a href="#type-value">value()</a>}
58+
</code></pre>
59+
60+
61+
62+
2363
### <a name="type-label">label()</a> ###
2464

2565

@@ -50,6 +90,36 @@ label_value() = term()
5090

5191

5292

93+
### <a name="type-labels">labels()</a> ###
94+
95+
96+
<pre><code>
97+
labels() = [<a href="#type-labels">labels()</a>]
98+
</code></pre>
99+
100+
101+
102+
103+
### <a name="type-metrics">metrics()</a> ###
104+
105+
106+
<pre><code>
107+
metrics() = [<a href="#type-tmetric">tmetric()</a>]
108+
</code></pre>
109+
110+
111+
112+
113+
### <a name="type-pbool">pbool()</a> ###
114+
115+
116+
<pre><code>
117+
pbool() = <a href="#type-prometheus_boolean">prometheus_boolean()</a> | {<a href="#type-prometheus_boolean">prometheus_boolean()</a>} | {<a href="#type-labels">labels()</a>, <a href="#type-prometheus_boolean">prometheus_boolean()</a>}
118+
</code></pre>
119+
120+
121+
122+
53123
### <a name="type-prometheus_boolean">prometheus_boolean()</a> ###
54124

55125

@@ -60,6 +130,36 @@ prometheus_boolean() = boolean() | number() | list() | undefined
60130

61131

62132

133+
### <a name="type-summary">summary()</a> ###
134+
135+
136+
<pre><code>
137+
summary() = {non_neg_integer(), <a href="#type-value">value()</a>} | {<a href="#type-labels">labels()</a>, non_neg_integer(), <a href="#type-value">value()</a>}
138+
</code></pre>
139+
140+
141+
142+
143+
### <a name="type-tmetric">tmetric()</a> ###
144+
145+
146+
<pre><code>
147+
tmetric() = <a href="#type-gauge">gauge()</a> | <a href="#type-counter">counter()</a> | <a href="#type-untyped">untyped()</a> | <a href="#type-summary">summary()</a> | <a href="#type-histogram">histogram()</a> | <a href="#type-pbool">pbool()</a>
148+
</code></pre>
149+
150+
151+
152+
153+
### <a name="type-untyped">untyped()</a> ###
154+
155+
156+
<pre><code>
157+
untyped() = <a href="#type-value">value()</a> | {<a href="#type-value">value()</a>} | {<a href="#type-labels">labels()</a>, <a href="#type-value">value()</a>}
158+
</code></pre>
159+
160+
161+
162+
63163
### <a name="type-value">value()</a> ###
64164

65165

@@ -80,7 +180,8 @@ Creates boolean metric with <code>Labels</code> and <code>Value</code>.</td></tr
80180
Equivalent to
81181
<a href="#counter_metric-2"><tt>counter_metric(Labels, Value)</tt></a>.</td></tr><tr><td valign="top"><a href="#counter_metric-2">counter_metric/2</a></td><td>
82182
Creates counter metric with <code>Labels</code> and <code>Value</code>.</td></tr><tr><td valign="top"><a href="#counter_metrics-1">counter_metrics/1</a></td><td>Equivalent to
83-
<a href="#counter_metric-1"><code>lists:map(fun counter_metric/1, Specs)</code></a>.</td></tr><tr><td valign="top"><a href="#create_mf-5">create_mf/5</a></td><td>
183+
<a href="#counter_metric-1"><code>lists:map(fun counter_metric/1, Specs)</code></a>.</td></tr><tr><td valign="top"><a href="#create_mf-4">create_mf/4</a></td><td>
184+
Create Metric Family of <code>Type</code>, <code>Name</code> and <code>Help</code>.</td></tr><tr><td valign="top"><a href="#create_mf-5">create_mf/5</a></td><td>
84185
Create Metric Family of <code>Type</code>, <code>Name</code> and <code>Help</code>.</td></tr><tr><td valign="top"><a href="#gauge_metric-1">gauge_metric/1</a></td><td>
85186
Equivalent to
86187
<a href="#gauge_metric-2"><tt>gauge_metric(Labels, Value)</tt></a>.</td></tr><tr><td valign="top"><a href="#gauge_metric-2">gauge_metric/2</a></td><td>
@@ -112,10 +213,10 @@ Creates untyped metric with <code>Labels</code> and <code>Value</code>.</td></tr
112213
### boolean_metric/1 ###
113214

114215
<pre><code>
115-
boolean_metric(Spec) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
216+
boolean_metric(Boolean) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
116217
</code></pre>
117218

118-
<ul class="definitions"><li><code>Spec = boolean() | {boolean()} | {[<a href="#type-label">label()</a>], <a href="#type-prometheus_boolean">prometheus_boolean()</a>}</code></li></ul>
219+
<ul class="definitions"><li><code>Boolean = <a href="#type-pbool">pbool()</a></code></li></ul>
119220

120221
Equivalent to
121222
[`boolean_metric(Labels, Value)`](#boolean_metric-2).
@@ -128,7 +229,7 @@ Equivalent to
128229
boolean_metric(Labels, Value) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
129230
</code></pre>
130231

131-
<ul class="definitions"><li><code>Labels = [<a href="#type-label">label()</a>]</code></li><li><code>Value = <a href="#type-prometheus_boolean">prometheus_boolean()</a></code></li></ul>
232+
<ul class="definitions"><li><code>Labels = <a href="#type-labels">labels()</a></code></li><li><code>Value = <a href="#type-prometheus_boolean">prometheus_boolean()</a></code></li></ul>
132233

133234
Creates boolean metric with `Labels` and `Value`.
134235

@@ -149,7 +250,7 @@ Equivalent to
149250
counter_metric(Spec) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
150251
</code></pre>
151252

152-
<ul class="definitions"><li><code>Spec = <a href="#type-value">value()</a> | {<a href="#type-value">value()</a>} | {[<a href="#type-label">label()</a>], <a href="#type-value">value()</a>}</code></li></ul>
253+
<ul class="definitions"><li><code>Spec = <a href="#type-counter">counter()</a></code></li></ul>
153254

154255
Equivalent to
155256
[`counter_metric(Labels, Value)`](#counter_metric-2).
@@ -162,7 +263,7 @@ Equivalent to
162263
counter_metric(Labels, Value) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
163264
</code></pre>
164265

165-
<ul class="definitions"><li><code>Labels = [<a href="#type-label">label()</a>]</code></li><li><code>Value = <a href="#type-value">value()</a></code></li></ul>
266+
<ul class="definitions"><li><code>Labels = <a href="#type-labels">labels()</a></code></li><li><code>Value = <a href="#type-value">value()</a></code></li></ul>
166267

167268
Creates counter metric with `Labels` and `Value`.
168269

@@ -175,6 +276,20 @@ Creates counter metric with `Labels` and `Value`.
175276
Equivalent to
176277
[`lists:map(fun counter_metric/1, Specs)`](#counter_metric-1).
177278

279+
<a name="create_mf-4"></a>
280+
281+
### create_mf/4 ###
282+
283+
<pre><code>
284+
create_mf(Name, Help, Type, Metrics) -&gt; MetricFamily
285+
</code></pre>
286+
287+
<ul class="definitions"><li><code>Name = <a href="prometheus_metric.md#type-name">prometheus_metric:name()</a></code></li><li><code>Help = <a href="prometheus_metric.md#type-help">prometheus_metric:help()</a></code></li><li><code>Type = atom()</code></li><li><code>Metrics = [<a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>] | <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a> | <a href="#type-metrics">metrics()</a></code></li><li><code>MetricFamily = <a href="prometheus_model.md#type-MetricFamily">prometheus_model:'MetricFamily'()</a></code></li></ul>
288+
289+
Create Metric Family of `Type`, `Name` and `Help`.
290+
`Collector:collect_metrics/2` callback will be called and expected to
291+
return individual metrics list.
292+
178293
<a name="create_mf-5"></a>
179294

180295
### create_mf/5 ###
@@ -194,10 +309,10 @@ return individual metrics list.
194309
### gauge_metric/1 ###
195310

196311
<pre><code>
197-
gauge_metric(Spec) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
312+
gauge_metric(Gauge) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
198313
</code></pre>
199314

200-
<ul class="definitions"><li><code>Spec = <a href="#type-value">value()</a> | {<a href="#type-value">value()</a>} | {[<a href="#type-label">label()</a>], <a href="#type-value">value()</a>}</code></li></ul>
315+
<ul class="definitions"><li><code>Gauge = <a href="#type-gauge">gauge()</a></code></li></ul>
201316

202317
Equivalent to
203318
[`gauge_metric(Labels, Value)`](#gauge_metric-2).
@@ -210,7 +325,7 @@ Equivalent to
210325
gauge_metric(Labels, Value) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
211326
</code></pre>
212327

213-
<ul class="definitions"><li><code>Labels = [<a href="#type-label">label()</a>]</code></li><li><code>Value = <a href="#type-value">value()</a></code></li></ul>
328+
<ul class="definitions"><li><code>Labels = <a href="#type-labels">labels()</a></code></li><li><code>Value = <a href="#type-value">value()</a></code></li></ul>
214329

215330
Creates gauge metric with `Labels` and `Value`.
216331

@@ -228,10 +343,10 @@ Equivalent to
228343
### histogram_metric/1 ###
229344

230345
<pre><code>
231-
histogram_metric(Spec) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
346+
histogram_metric(Histogram) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
232347
</code></pre>
233348

234-
<ul class="definitions"><li><code>Spec = {Labels, Buckets, Count, Sum} | {Buckets, Count, Sum}</code></li><li><code>Labels = [<a href="#type-label">label()</a>]</code></li><li><code>Buckets = [{Bound, Count}]</code></li><li><code>Bound = <a href="prometheus_buckets.md#type-bucket_bound">prometheus_buckets:bucket_bound()</a></code></li><li><code>Count = non_neg_integer()</code></li><li><code>Sum = <a href="#type-value">value()</a></code></li></ul>
349+
<ul class="definitions"><li><code>Histogram = <a href="#type-histogram">histogram()</a></code></li></ul>
235350

236351
Equivalent to
237352
[
@@ -253,7 +368,7 @@ Equivalent to [`histogram_metric([], Buckets, Count, Sum)`](#histogram_metric-4)
253368
histogram_metric(Labels, Buckets, Count, Sum) -&gt; Metric
254369
</code></pre>
255370

256-
<ul class="definitions"><li><code>Labels = [<a href="#type-label">label()</a>]</code></li><li><code>Buckets = [{Bound, Count}]</code></li><li><code>Bound = <a href="prometheus_buckets.md#type-bucket_bound">prometheus_buckets:bucket_bound()</a></code></li><li><code>Count = non_neg_integer()</code></li><li><code>Sum = <a href="#type-value">value()</a></code></li><li><code>Metric = <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a></code></li></ul>
371+
<ul class="definitions"><li><code>Labels = <a href="#type-labels">labels()</a></code></li><li><code>Buckets = [{Bound, Count}]</code></li><li><code>Bound = <a href="prometheus_buckets.md#type-bucket_bound">prometheus_buckets:bucket_bound()</a></code></li><li><code>Count = non_neg_integer()</code></li><li><code>Sum = <a href="#type-value">value()</a></code></li><li><code>Metric = <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a></code></li></ul>
257372

258373
Creates histogram metric with `Labels`, `Buckets`, `Count` and `Sum`.
259374

@@ -291,10 +406,10 @@ Equivalent to
291406
### summary_metric/1 ###
292407

293408
<pre><code>
294-
summary_metric(Spec) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
409+
summary_metric(Summary) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
295410
</code></pre>
296411

297-
<ul class="definitions"><li><code>Spec = {Labels, Count, Sum} | {Count, Sum}</code></li><li><code>Labels = [<a href="#type-label">label()</a>]</code></li><li><code>Count = non_neg_integer()</code></li><li><code>Sum = <a href="#type-value">value()</a></code></li></ul>
412+
<ul class="definitions"><li><code>Summary = <a href="#type-summary">summary()</a></code></li></ul>
298413

299414
Equivalent to
300415
[`summary_metric(Labels, Count, Sum)`](#summary_metric-3).
@@ -315,7 +430,7 @@ Equivalent to [`summary_metric([], Count, Sum)`](#summary_metric-3).
315430
summary_metric(Labels, Count, Sum) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
316431
</code></pre>
317432

318-
<ul class="definitions"><li><code>Labels = [<a href="#type-label">label()</a>]</code></li><li><code>Count = non_neg_integer()</code></li><li><code>Sum = <a href="#type-value">value()</a></code></li></ul>
433+
<ul class="definitions"><li><code>Labels = <a href="#type-labels">labels()</a></code></li><li><code>Count = non_neg_integer()</code></li><li><code>Sum = <a href="#type-value">value()</a></code></li></ul>
319434

320435
Creates summary metric with `Labels`, `Count` and `Sum`.
321436

@@ -333,10 +448,10 @@ Equivalent to
333448
### untyped_metric/1 ###
334449

335450
<pre><code>
336-
untyped_metric(Spec) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
451+
untyped_metric(Untyped) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
337452
</code></pre>
338453

339-
<ul class="definitions"><li><code>Spec = <a href="#type-value">value()</a> | {<a href="#type-value">value()</a>} | {[<a href="#type-label">label()</a>], <a href="#type-value">value()</a>}</code></li></ul>
454+
<ul class="definitions"><li><code>Untyped = <a href="#type-untyped">untyped()</a></code></li></ul>
340455

341456
Equivalent to
342457
[`untyped_metric(Labels, Value)`](#untyped_metric-2).
@@ -349,7 +464,7 @@ Equivalent to
349464
untyped_metric(Labels, Value) -&gt; <a href="prometheus_model.md#type-Metric">prometheus_model:'Metric'()</a>
350465
</code></pre>
351466

352-
<ul class="definitions"><li><code>Labels = [<a href="#type-label">label()</a>]</code></li><li><code>Value = <a href="#type-value">value()</a></code></li></ul>
467+
<ul class="definitions"><li><code>Labels = <a href="#type-labels">labels()</a></code></li><li><code>Value = <a href="#type-value">value()</a></code></li></ul>
353468

354469
Creates untyped metric with `Labels` and `Value`.
355470

doc/prometheus_vm_memory_collector.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Type: gauge.<br />
2929
The total amount of memory currently allocated.
3030
This is the same as the sum of the memory size for processes and system.
3131

32-
* `erlang_vm_dets_tables`<br />
32+
* `erlang_vm_memory_dets_tables`<br />
3333
Type: gauge.<br />
3434
Erlang VM DETS Tables count.
3535

36-
* `erlang_vm_ets_tables`<br />
36+
* `erlang_vm_memory_ets_tables`<br />
3737
Type: gauge.<br />
3838
Erlang VM ETS Tables count.
3939

doc/prometheus_vm_statistics_collector.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ The total number of bytes received through ports.
3030
Type: counter.<br />
3131
The total number of context switches since the system started.
3232

33-
* `erlang_vm_statistics_dirty_cpu_run_queue_length_total`<br />
33+
* `erlang_vm_statistics_dirty_cpu_run_queue_length`<br />
3434
Type: gauge.<br />
35-
The total length of the dirty CPU run-queue.
35+
Length of the dirty CPU run-queue.
3636

37-
* `erlang_vm_statistics_dirty_io_run_queue_length_total`<br />
37+
* `erlang_vm_statistics_dirty_io_run_queue_length`<br />
3838
Type: gauge.<br />
39-
The total length of the dirty IO run-queue.
39+
Length of the dirty IO run-queue.
4040

4141
* `erlang_vm_statistics_garbage_collection_number_of_gcs`<br />
4242
Type: counter.<br />

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule Prometheus.Mixfile do
33

44
def project do
55
[app: :prometheus,
6-
version: "3.4.1",
6+
version: "3.4.2",
77
description: description(),
88
package: package()]
99
end

src/prometheus.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{application, prometheus,
22
[{description, "Prometheus.io client in Erlang"},
3-
{vsn, "3.4.1"},
3+
{vsn, "3.4.2"},
44
{registered, []},
55
{mod, { prometheus, []}},
66
{applications,

0 commit comments

Comments
 (0)