Skip to content

Commit 0e9661c

Browse files
committed
Bump to v4.0.0
1 parent 39d505b commit 0e9661c

File tree

11 files changed

+46
-294
lines changed

11 files changed

+46
-294
lines changed

README.md

Lines changed: 1 addition & 2 deletions
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.6
7+
__Version:__ 4.0.0
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)
@@ -277,7 +277,6 @@ MIT
277277
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_counter.md" class="module">prometheus_counter</a></td></tr>
278278
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_format.md" class="module">prometheus_format</a></td></tr>
279279
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_gauge.md" class="module">prometheus_gauge</a></td></tr>
280-
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_histogram.md" class="module">prometheus_histogram</a></td></tr>
281280
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_http.md" class="module">prometheus_http</a></td></tr>
282281
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_mnesia.md" class="module">prometheus_mnesia</a></td></tr>
283282
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_mnesia_collector.md" class="module">prometheus_mnesia_collector</a></td></tr>

doc/README.md

Lines changed: 1 addition & 2 deletions
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.6
7+
__Version:__ 4.0.0
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)
@@ -277,7 +277,6 @@ MIT
277277
<tr><td><a href="prometheus_counter.md" class="module">prometheus_counter</a></td></tr>
278278
<tr><td><a href="prometheus_format.md" class="module">prometheus_format</a></td></tr>
279279
<tr><td><a href="prometheus_gauge.md" class="module">prometheus_gauge</a></td></tr>
280-
<tr><td><a href="prometheus_histogram.md" class="module">prometheus_histogram</a></td></tr>
281280
<tr><td><a href="prometheus_http.md" class="module">prometheus_http</a></td></tr>
282281
<tr><td><a href="prometheus_mnesia.md" class="module">prometheus_mnesia</a></td></tr>
283282
<tr><td><a href="prometheus_mnesia_collector.md" class="module">prometheus_mnesia_collector</a></td></tr>

doc/edoc-info

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
{application,prometheus}.
33
{modules,[prometheus_boolean,prometheus_buckets,prometheus_collector,
44
prometheus_counter,prometheus_format,prometheus_gauge,
5-
prometheus_histogram,prometheus_http,prometheus_mnesia,
6-
prometheus_mnesia_collector,prometheus_model_helpers,
7-
prometheus_protobuf_format,prometheus_registry,prometheus_summary,
8-
prometheus_text_format,prometheus_time,
9-
prometheus_vm_memory_collector,prometheus_vm_statistics_collector,
5+
prometheus_http,prometheus_mnesia,prometheus_mnesia_collector,
6+
prometheus_model_helpers,prometheus_protobuf_format,
7+
prometheus_registry,prometheus_summary,prometheus_text_format,
8+
prometheus_time,prometheus_vm_memory_collector,
9+
prometheus_vm_statistics_collector,
1010
prometheus_vm_system_info_collector]}.

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.6
3+
@version 4.0.0
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_buckets.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ Creates <code>Count</code> buckets, where the lowest bucket has an
4040
upper bound of <code>Start</code> and each following bucket's upper bound is <code>Factor</code>
4141
times the previous bucket's upper bound.</td></tr><tr><td valign="top"><a href="#linear-3">linear/3</a></td><td>
4242
Creates <code>Count</code> buckets, each <code>Width</code> wide, where the lowest
43-
bucket has an upper bound of <code>Start</code>.</td></tr></table>
43+
bucket has an upper bound of <code>Start</code>.</td></tr><tr><td valign="top"><a href="#new-0">new/0</a></td><td></td></tr><tr><td valign="top"><a href="#new-1">new/1</a></td><td>
44+
Histogram buckets constructor.</td></tr><tr><td valign="top"><a href="#position-2">position/2</a></td><td></td></tr></table>
4445

4546

4647
<a name="functions"></a>
@@ -114,3 +115,23 @@ used for the `buckets` key of histogram constructors options.
114115
The function raises `{invalid_value, Value, Message}` error if `Count`
115116
is zero or negative.
116117

118+
<a name="new-0"></a>
119+
120+
### new/0 ###
121+
122+
`new() -> any()`
123+
124+
<a name="new-1"></a>
125+
126+
### new/1 ###
127+
128+
`new(RawBuckets) -> any()`
129+
130+
Histogram buckets constructor
131+
132+
<a name="position-2"></a>
133+
134+
### position/2 ###
135+
136+
`position(Buckets, Value) -> any()`
137+

doc/prometheus_collector.md

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ data() = any()
108108
## Function Index ##
109109

110110

111-
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#collect_mf-3">collect_mf/3</a></td><td>Calls <code>Callback</code> for each MetricFamily of this collector.</td></tr><tr><td valign="top"><a href="#deregister-1">deregister/1</a></td><td>(<em>Deprecated</em>.) Equivalent to <a href="#deregister-2"><tt>deregister(Collector, default)</tt></a>.</td></tr><tr><td valign="top"><a href="#deregister-2">deregister/2</a></td><td>(<em>Deprecated</em>.) </td></tr><tr><td valign="top"><a href="#register-1">register/1</a></td><td>(<em>Deprecated</em>.) Equivalent to <a href="#register-2"><tt>register(Collector, default)</tt></a>.</td></tr><tr><td valign="top"><a href="#register-2">register/2</a></td><td>(<em>Deprecated</em>.) </td></tr></table>
111+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#collect_mf-3">collect_mf/3</a></td><td>Calls <code>Callback</code> for each MetricFamily of this collector.</td></tr></table>
112112

113113

114114
<a name="functions"></a>
@@ -127,47 +127,3 @@ collect_mf(Registry, Collector, Callback) -&gt; ok
127127

128128
Calls `Callback` for each MetricFamily of this collector.
129129

130-
<a name="deregister-1"></a>
131-
132-
### deregister/1 ###
133-
134-
`deregister(Collector) -> any()`
135-
136-
Equivalent to [`deregister(Collector, default)`](#deregister-2).
137-
138-
__This function is deprecated:__ Please use [`prometheus_registry:deregister_collector/1`](prometheus_registry.md#deregister_collector-1)
139-
140-
<a name="deregister-2"></a>
141-
142-
### deregister/2 ###
143-
144-
<pre><code>
145-
deregister(Collector, Registry) -&gt; ok
146-
</code></pre>
147-
148-
<ul class="definitions"><li><code>Collector = <a href="#type-collector">collector()</a></code></li><li><code>Registry = <a href="prometheus_registry.md#type-registry">prometheus_registry:registry()</a></code></li></ul>
149-
150-
__This function is deprecated:__ Please use [`prometheus_registry:deregister_collector/2`](prometheus_registry.md#deregister_collector-2)
151-
152-
<a name="register-1"></a>
153-
154-
### register/1 ###
155-
156-
`register(Collector) -> any()`
157-
158-
Equivalent to [`register(Collector, default)`](#register-2).
159-
160-
__This function is deprecated:__ Please use [`prometheus_registry:register_collector/1`](prometheus_registry.md#register_collector-1)
161-
162-
<a name="register-2"></a>
163-
164-
### register/2 ###
165-
166-
<pre><code>
167-
register(Collector, Registry) -&gt; ok
168-
</code></pre>
169-
170-
<ul class="definitions"><li><code>Collector = <a href="#type-collector">collector()</a></code></li><li><code>Registry = <a href="prometheus_registry.md#type-registry">prometheus_registry:registry()</a></code></li></ul>
171-
172-
__This function is deprecated:__ Please use [`prometheus_registry:register_collector/2`](prometheus_registry.md#register_collector-2)
173-

doc/prometheus_counter.md

Lines changed: 5 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Counter is a Metric that represents a single numerical value that only ever
99
goes up.
1010

11-
__Behaviours:__ [`gen_server`](gen_server.md), [`prometheus_collector`](prometheus_collector.md), [`prometheus_metric`](prometheus_metric.md).
11+
__Behaviours:__ [`prometheus_collector`](prometheus_collector.md), [`prometheus_metric`](prometheus_metric.md).
1212

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

@@ -67,17 +67,13 @@ Example:
6767

6868

6969
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#declare-1">declare/1</a></td><td>Creates a counter using <code>Spec</code>, if a counter with the same <code>Spec</code> exists
70-
returns <code>false</code>.</td></tr><tr><td valign="top"><a href="#declare-2">declare/2</a></td><td>(<em>Deprecated</em>.) </td></tr><tr><td valign="top"><a href="#deregister-1">deregister/1</a></td><td>Equivalent to <a href="#deregister-2"><tt>deregister(default, Name)</tt></a>.</td></tr><tr><td valign="top"><a href="#deregister-2">deregister/2</a></td><td>
70+
returns <code>false</code>.</td></tr><tr><td valign="top"><a href="#deregister-1">deregister/1</a></td><td>Equivalent to <a href="#deregister-2"><tt>deregister(default, Name)</tt></a>.</td></tr><tr><td valign="top"><a href="#deregister-2">deregister/2</a></td><td>
7171
Removes all counter series with name <code>Name</code> and
72-
removes Metric Family from <code>Registry</code>.</td></tr><tr><td valign="top"><a href="#dinc-1">dinc/1</a></td><td>Equivalent to <a href="#dinc-4"><tt>dinc(default, Name, [], 1)</tt></a>.</td></tr><tr><td valign="top"><a href="#dinc-2">dinc/2</a></td><td>If the second argument is a list, equivalent to
73-
<a href="#dinc-4"><tt>dinc(default, Name, LabelValues, 1)</tt></a>
74-
otherwise equivalent to
75-
<a href="#dinc-4"><tt>dinc(default, Name, [], Value)</tt></a>.</td></tr><tr><td valign="top"><a href="#dinc-3">dinc/3</a></td><td>Equivalent to <a href="#dinc-4"><tt>dinc(default, Name, LabelValues, Value)</tt></a>.</td></tr><tr><td valign="top"><a href="#dinc-4">dinc/4</a></td><td>Increments the counter identified by <code>Registry</code>, <code>Name</code>
76-
and <code>LabelValues</code> by <code>Value</code>.</td></tr><tr><td valign="top"><a href="#inc-1">inc/1</a></td><td>Equivalent to <a href="#inc-4"><tt>inc(default, Name, [], 1)</tt></a>.</td></tr><tr><td valign="top"><a href="#inc-2">inc/2</a></td><td>If the second argument is a list, equivalent to
72+
removes Metric Family from <code>Registry</code>.</td></tr><tr><td valign="top"><a href="#inc-1">inc/1</a></td><td>Equivalent to <a href="#inc-4"><tt>inc(default, Name, [], 1)</tt></a>.</td></tr><tr><td valign="top"><a href="#inc-2">inc/2</a></td><td>If the second argument is a list, equivalent to
7773
<a href="#inc-4"><tt>inc(default, Name, LabelValues, 1)</tt></a>
7874
otherwise equivalent to
7975
<a href="#inc-4"><tt>inc(default, Name, [], Value)</tt></a>.</td></tr><tr><td valign="top"><a href="#inc-3">inc/3</a></td><td>Equivalent to <a href="#inc-4"><tt>inc(default, Name, LabelValues, Value)</tt></a>.</td></tr><tr><td valign="top"><a href="#inc-4">inc/4</a></td><td>Increments the counter identified by <code>Registry</code>, <code>Name</code>
80-
and <code>LabelValues</code> by <code>Value</code>.</td></tr><tr><td valign="top"><a href="#new-1">new/1</a></td><td>Creates a counter using <code>Spec</code>.</td></tr><tr><td valign="top"><a href="#new-2">new/2</a></td><td>(<em>Deprecated</em>.) </td></tr><tr><td valign="top"><a href="#remove-1">remove/1</a></td><td>Equivalent to <a href="#remove-3"><tt>remove(default, Name, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#remove-2">remove/2</a></td><td>Equivalent to <a href="#remove-3"><tt>remove(default, Name, LabelValues)</tt></a>.</td></tr><tr><td valign="top"><a href="#remove-3">remove/3</a></td><td>Removes counter series identified by <code>Registry</code>, <code>Name</code>
76+
and <code>LabelValues</code> by <code>Value</code>.</td></tr><tr><td valign="top"><a href="#new-1">new/1</a></td><td>Creates a counter using <code>Spec</code>.</td></tr><tr><td valign="top"><a href="#remove-1">remove/1</a></td><td>Equivalent to <a href="#remove-3"><tt>remove(default, Name, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#remove-2">remove/2</a></td><td>Equivalent to <a href="#remove-3"><tt>remove(default, Name, LabelValues)</tt></a>.</td></tr><tr><td valign="top"><a href="#remove-3">remove/3</a></td><td>Removes counter series identified by <code>Registry</code>, <code>Name</code>
8177
and <code>LabelValues</code>.</td></tr><tr><td valign="top"><a href="#reset-1">reset/1</a></td><td>Equivalent to <a href="#reset-3"><tt>reset(default, Name, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#reset-2">reset/2</a></td><td>Equivalent to <a href="#reset-3"><tt>reset(default, Name, LabelValues)</tt></a>.</td></tr><tr><td valign="top"><a href="#reset-3">reset/3</a></td><td>Resets the value of the counter identified by <code>Registry</code>, <code>Name</code>
8278
and <code>LabelValues</code>.</td></tr><tr><td valign="top"><a href="#value-1">value/1</a></td><td>Equivalent to <a href="#value-3"><tt>value(default, Name, [])</tt></a>.</td></tr><tr><td valign="top"><a href="#value-2">value/2</a></td><td>Equivalent to <a href="#value-3"><tt>value(default, Name, LabelValues)</tt></a>.</td></tr><tr><td valign="top"><a href="#value-3">value/3</a></td><td>Returns the value of the counter identified by <code>Registry</code>, <code>Name</code>
8379
and <code>LabelValues</code>.</td></tr></table>
@@ -107,15 +103,6 @@ isn't a list.<br />
107103
Raises `{invalid_label_name, Name, Message}` error if `Name` isn't a valid
108104
label name.
109105

110-
<a name="declare-2"></a>
111-
112-
### declare/2 ###
113-
114-
`declare(Spec, Registry) -> any()`
115-
116-
__This function is deprecated:__ Please use [`declare/1`](#declare-1) with registry
117-
key instead.
118-
119106
<a name="deregister-1"></a>
120107

121108
### deregister/1 ###
@@ -138,51 +125,6 @@ After this call new/1 for `Name` and `Registry` will succeed.
138125
Returns `{true, _}` if `Name` was a registered counter.
139126
Otherwise returns `{true, _}`.
140127

141-
<a name="dinc-1"></a>
142-
143-
### dinc/1 ###
144-
145-
`dinc(Name) -> any()`
146-
147-
Equivalent to [`dinc(default, Name, [], 1)`](#dinc-4).
148-
149-
<a name="dinc-2"></a>
150-
151-
### dinc/2 ###
152-
153-
`dinc(Name, LabelValues) -> any()`
154-
155-
If the second argument is a list, equivalent to
156-
[`dinc(default, Name, LabelValues, 1)`](#dinc-4)
157-
otherwise equivalent to
158-
[`dinc(default, Name, [], Value)`](#dinc-4).
159-
160-
<a name="dinc-3"></a>
161-
162-
### dinc/3 ###
163-
164-
`dinc(Name, LabelValues, Value) -> any()`
165-
166-
Equivalent to [`dinc(default, Name, LabelValues, Value)`](#dinc-4).
167-
168-
<a name="dinc-4"></a>
169-
170-
### dinc/4 ###
171-
172-
`dinc(Registry, Name, LabelValues, Value) -> any()`
173-
174-
Increments the counter identified by `Registry`, `Name`
175-
and `LabelValues` by `Value`.
176-
If `Value` happened to be a float number even one time(!) you
177-
shouldn't use [`inc/4`](#inc-4) after dinc.
178-
179-
Raises `{invalid_value, Value, Message}` if `Value`
180-
isn't a number.<br />
181-
Raises `{unknown_metric, Registry, Name}` error if counter with named `Name`
182-
can't be found in `Registry`.<br />
183-
Raises `{invalid_metric_arity, Present, Expected}` error if labels count
184-
mismatch.
185-
186128
<a name="inc-1"></a>
187129

188130
### inc/1 ###
@@ -220,7 +162,7 @@ Increments the counter identified by `Registry`, `Name`
220162
and `LabelValues` by `Value`.
221163

222164
Raises `{invalid_value, Value, Message}` if `Value`
223-
isn't a positive integer.<br />
165+
isn't a positive number.<br />
224166
Raises `{unknown_metric, Registry, Name}` error if counter with named `Name`
225167
can't be found in `Registry`.<br />
226168
Raises `{invalid_metric_arity, Present, Expected}` error if labels count
@@ -247,15 +189,6 @@ label name.<br />
247189
Raises `{mf_already_exists, {Registry, Name}, Message}` error if a counter
248190
with the same `Spec` already exists.
249191

250-
<a name="new-2"></a>
251-
252-
### new/2 ###
253-
254-
`new(Spec, Registry) -> any()`
255-
256-
__This function is deprecated:__ Please use [`new/1`](#new-1) with registry
257-
key instead.
258-
259192
<a name="remove-1"></a>
260193

261194
### remove/1 ###

0 commit comments

Comments
 (0)