Skip to content

Commit

Permalink
Bump to v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
deadtrickster committed Feb 18, 2018
1 parent 39d505b commit 0e9661c
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 294 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

__Version:__ 3.4.6
__Version:__ 4.0.0

[![Hex.pm](https://img.shields.io/hexpm/v/prometheus.svg?maxAge=2592000?style=plastic)](https://hex.pm/packages/prometheus)
[![Hex.pm](https://img.shields.io/hexpm/dt/prometheus.svg?maxAge=2592000)](https://hex.pm/packages/prometheus)
Expand Down Expand Up @@ -277,7 +277,6 @@ MIT
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_counter.md" class="module">prometheus_counter</a></td></tr>
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_format.md" class="module">prometheus_format</a></td></tr>
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_gauge.md" class="module">prometheus_gauge</a></td></tr>
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_histogram.md" class="module">prometheus_histogram</a></td></tr>
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_http.md" class="module">prometheus_http</a></td></tr>
<tr><td><a href="https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_mnesia.md" class="module">prometheus_mnesia</a></td></tr>
<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>
Expand Down
3 changes: 1 addition & 2 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

__Version:__ 3.4.6
__Version:__ 4.0.0

[![Hex.pm](https://img.shields.io/hexpm/v/prometheus.svg?maxAge=2592000?style=plastic)](https://hex.pm/packages/prometheus)
[![Hex.pm](https://img.shields.io/hexpm/dt/prometheus.svg?maxAge=2592000)](https://hex.pm/packages/prometheus)
Expand Down Expand Up @@ -277,7 +277,6 @@ MIT
<tr><td><a href="prometheus_counter.md" class="module">prometheus_counter</a></td></tr>
<tr><td><a href="prometheus_format.md" class="module">prometheus_format</a></td></tr>
<tr><td><a href="prometheus_gauge.md" class="module">prometheus_gauge</a></td></tr>
<tr><td><a href="prometheus_histogram.md" class="module">prometheus_histogram</a></td></tr>
<tr><td><a href="prometheus_http.md" class="module">prometheus_http</a></td></tr>
<tr><td><a href="prometheus_mnesia.md" class="module">prometheus_mnesia</a></td></tr>
<tr><td><a href="prometheus_mnesia_collector.md" class="module">prometheus_mnesia_collector</a></td></tr>
Expand Down
10 changes: 5 additions & 5 deletions doc/edoc-info
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{application,prometheus}.
{modules,[prometheus_boolean,prometheus_buckets,prometheus_collector,
prometheus_counter,prometheus_format,prometheus_gauge,
prometheus_histogram,prometheus_http,prometheus_mnesia,
prometheus_mnesia_collector,prometheus_model_helpers,
prometheus_protobuf_format,prometheus_registry,prometheus_summary,
prometheus_text_format,prometheus_time,
prometheus_vm_memory_collector,prometheus_vm_statistics_collector,
prometheus_http,prometheus_mnesia,prometheus_mnesia_collector,
prometheus_model_helpers,prometheus_protobuf_format,
prometheus_registry,prometheus_summary,prometheus_text_format,
prometheus_time,prometheus_vm_memory_collector,
prometheus_vm_statistics_collector,
prometheus_vm_system_info_collector]}.
2 changes: 1 addition & 1 deletion doc/overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@copyright 2016,2017 Ilya Khaprov <<[email protected]>>.
@title Prometheus.io client for Erlang
@version 3.4.6
@version 4.0.0

@doc
[![Hex.pm](https://img.shields.io/hexpm/v/prometheus.svg?maxAge=2592000?style=plastic)](https://hex.pm/packages/prometheus)
Expand Down
23 changes: 22 additions & 1 deletion doc/prometheus_buckets.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Creates <code>Count</code> buckets, where the lowest bucket has an
upper bound of <code>Start</code> and each following bucket's upper bound is <code>Factor</code>
times the previous bucket's upper bound.</td></tr><tr><td valign="top"><a href="#linear-3">linear/3</a></td><td>
Creates <code>Count</code> buckets, each <code>Width</code> wide, where the lowest
bucket has an upper bound of <code>Start</code>.</td></tr></table>
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>
Histogram buckets constructor.</td></tr><tr><td valign="top"><a href="#position-2">position/2</a></td><td></td></tr></table>


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

<a name="new-0"></a>

### new/0 ###

`new() -> any()`

<a name="new-1"></a>

### new/1 ###

`new(RawBuckets) -> any()`

Histogram buckets constructor

<a name="position-2"></a>

### position/2 ###

`position(Buckets, Value) -> any()`

46 changes: 1 addition & 45 deletions doc/prometheus_collector.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ data() = any()
## Function Index ##


<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>
<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>


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

Calls `Callback` for each MetricFamily of this collector.

<a name="deregister-1"></a>

### deregister/1 ###

`deregister(Collector) -> any()`

Equivalent to [`deregister(Collector, default)`](#deregister-2).

__This function is deprecated:__ Please use [`prometheus_registry:deregister_collector/1`](prometheus_registry.md#deregister_collector-1)

<a name="deregister-2"></a>

### deregister/2 ###

<pre><code>
deregister(Collector, Registry) -&gt; ok
</code></pre>

<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>

__This function is deprecated:__ Please use [`prometheus_registry:deregister_collector/2`](prometheus_registry.md#deregister_collector-2)

<a name="register-1"></a>

### register/1 ###

`register(Collector) -> any()`

Equivalent to [`register(Collector, default)`](#register-2).

__This function is deprecated:__ Please use [`prometheus_registry:register_collector/1`](prometheus_registry.md#register_collector-1)

<a name="register-2"></a>

### register/2 ###

<pre><code>
register(Collector, Registry) -&gt; ok
</code></pre>

<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>

__This function is deprecated:__ Please use [`prometheus_registry:register_collector/2`](prometheus_registry.md#register_collector-2)

77 changes: 5 additions & 72 deletions doc/prometheus_counter.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Counter is a Metric that represents a single numerical value that only ever
goes up.

__Behaviours:__ [`gen_server`](gen_server.md), [`prometheus_collector`](prometheus_collector.md), [`prometheus_metric`](prometheus_metric.md).
__Behaviours:__ [`prometheus_collector`](prometheus_collector.md), [`prometheus_metric`](prometheus_metric.md).

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

Expand Down Expand Up @@ -67,17 +67,13 @@ Example:


<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
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>
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>
Removes all counter series with name <code>Name</code> and
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
<a href="#dinc-4"><tt>dinc(default, Name, LabelValues, 1)</tt></a>
otherwise equivalent to
<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>
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
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
<a href="#inc-4"><tt>inc(default, Name, LabelValues, 1)</tt></a>
otherwise equivalent to
<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>
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>
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>
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>
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>
and <code>LabelValues</code>.</td></tr></table>
Expand Down Expand Up @@ -107,15 +103,6 @@ isn't a list.<br />
Raises `{invalid_label_name, Name, Message}` error if `Name` isn't a valid
label name.

<a name="declare-2"></a>

### declare/2 ###

`declare(Spec, Registry) -> any()`

__This function is deprecated:__ Please use [`declare/1`](#declare-1) with registry
key instead.

<a name="deregister-1"></a>

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

<a name="dinc-1"></a>

### dinc/1 ###

`dinc(Name) -> any()`

Equivalent to [`dinc(default, Name, [], 1)`](#dinc-4).

<a name="dinc-2"></a>

### dinc/2 ###

`dinc(Name, LabelValues) -> any()`

If the second argument is a list, equivalent to
[`dinc(default, Name, LabelValues, 1)`](#dinc-4)
otherwise equivalent to
[`dinc(default, Name, [], Value)`](#dinc-4).

<a name="dinc-3"></a>

### dinc/3 ###

`dinc(Name, LabelValues, Value) -> any()`

Equivalent to [`dinc(default, Name, LabelValues, Value)`](#dinc-4).

<a name="dinc-4"></a>

### dinc/4 ###

`dinc(Registry, Name, LabelValues, Value) -> any()`

Increments the counter identified by `Registry`, `Name`
and `LabelValues` by `Value`.
If `Value` happened to be a float number even one time(!) you
shouldn't use [`inc/4`](#inc-4) after dinc.

Raises `{invalid_value, Value, Message}` if `Value`
isn't a number.<br />
Raises `{unknown_metric, Registry, Name}` error if counter with named `Name`
can't be found in `Registry`.<br />
Raises `{invalid_metric_arity, Present, Expected}` error if labels count
mismatch.

<a name="inc-1"></a>

### inc/1 ###
Expand Down Expand Up @@ -220,7 +162,7 @@ Increments the counter identified by `Registry`, `Name`
and `LabelValues` by `Value`.

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

<a name="new-2"></a>

### new/2 ###

`new(Spec, Registry) -> any()`

__This function is deprecated:__ Please use [`new/1`](#new-1) with registry
key instead.

<a name="remove-1"></a>

### remove/1 ###
Expand Down
Loading

0 comments on commit 0e9661c

Please sign in to comment.