44
55Copyright (c) 2014 Basho Technologies, Inc. All Rights Reserved.
66
7- __ Version:__ Feb 17 2024 13:59:12
7+ __ Version:__ Feb 17 2024 15:18:00
88
99__ Authors:__ Ulf Wiger ([ ` ulf.wiger@feuerlabs.com ` ] ( mailto:ulf.wiger@feuerlabs.com ) ), Magnus Feuer ([ ` magnus.feuer@feuerlabs.com ` ] ( mailto:magnus.feuer@feuerlabs.com ) ).
1010
@@ -88,8 +88,8 @@ Metrics are identified by a list of terms, such as given below:
8888` [ xml_front_end, parser, file_size ] `
8989
9090A metric is created through a call by the code to be instrumented to
91- ` exometer:new() ` . Once created, the metric can be updated through
92- ` exometer:update() ` , or on its own initiative through the
91+ ` exometer:new/2 ` . Once created, the metric can be updated through
92+ ` exometer:update/2 ` , or on its own initiative through the
9393` exometer_probe:sample ` behavior implementation.
9494
9595
@@ -113,7 +113,7 @@ given metric.
113113#### <a name =" Metric_Type " >Metric Type</a > ####
114114
115115The type of a metric, specified when the metric is created through
116- ` exometer:new() ` , determines which ` exometer_entry `
116+ ` exometer:new/2 ` , determines which ` exometer_entry `
117117callback to use.
118118
119119The link between the type and the entry to use is configured
@@ -127,7 +127,7 @@ configurable `exometer_entry` callback.
127127#### <a name =" Entry_Callback " >Entry Callback</a > ####
128128
129129An exometer entry callback will receive values reported to a metric through the
130- ` exometer:update() ` call and compile it into one or more data points.
130+ ` exometer:update/2 ` call and compile it into one or more data points.
131131The entry callback can either be a counter (implemented natively
132132in ` exometer ` ), or a more complex statistical analysis such
133133as a uniform distribution or a regular histogram.
@@ -153,7 +153,7 @@ the given subsystem and add it to the metric's data points.
153153
154154#### <a name =" Caching " >Caching</a > ####
155155
156- Metric and data point values are read with the ` exometer:get_value() `
156+ Metric and data point values are read with the ` exometer:get_value/1 `
157157function. In the case of counters, this operation is very fast. With probes,
158158the call results in a synchronous dialog with the probe process, and the
159159cost of serving the request depends on the probe implementation and the
@@ -162,12 +162,12 @@ nature of the metric being served.
162162If the cost of reading the value is so high that calling the function often
163163would result in prohibitive load, it is possible to cache the value. This is
164164done either explicitly from the probe itself (by calling
165- ` exometer_cache:write() ` ), or by specifying the option ` {cache, Lifetime} `
165+ ` exometer_cache:write/3 ` ), or by specifying the option ` {cache, Lifetime} `
166166for the entry. If an entry has a non-zero cache lifetime specified, the
167- ` get_value() ` call will try fetching the cached value before calling the
167+ ` get_value/1 ` call will try fetching the cached value before calling the
168168actual entry and automatically caching the result.
169169
170- Note that if ` {cache, Lifetime} ` is not specified, ` exometer:get_value() `
170+ Note that if ` {cache, Lifetime} ` is not specified, ` exometer:get_value/1 `
171171will neither read nor write to the cache. It is possible for the probe
172172to periodically cache a value regardless of how the cache lifetime is set,
173173and the probe may also explicitly read from the cache if it isn't done
@@ -185,15 +185,15 @@ Each subscription ties a specific metric-datapoint pair to a reporter
185185and an interval (given in milliseconds). The reporter system will, at
186186the given interval, send the current value of the data point to the
187187subscribing reporter. The subscription, with all its parameters,
188- is setup through a call to ` exometer_report:subscribe() ` .
188+ is setup through a call to ` exometer_report:subscribe/4 ` .
189189
190190In the case of processes, subscribed-to values will be delivered as a
191191message. Modules, which implement the ` exometer_report ` callback
192192behavior, will receive the plugins as a callbacks within the
193193` exometer_report ` process.
194194
195195Subscriptions can either be setup at runtime, through
196- ` exometer_report:subscribe() ` calls, or statically through the
196+ ` exometer_report:subscribe/4 ` calls, or statically through the
197197` exometer_report ` configuration data.
198198
199199
@@ -206,10 +206,10 @@ with the Exometer Core package, as described below:
206206#### <a name =" counter_(exometer_native) " >counter (exometer native)</a > ####
207207
208208The counter is implemented directly in ` exometer ` to provide simple
209- counters. A call to ` exometer:update() ` will add the provided value
209+ counters. A call to ` exometer:update/2 ` will add the provided value
210210to the counter.
211211
212- The counter can be reset to zero through ` exometer:reset() ` .
212+ The counter can be reset to zero through ` exometer:reset/1 ` .
213213
214214The available data points under a metric using the counter entry
215215are ` value ` and ` ms_since_reset ` .
@@ -224,10 +224,10 @@ comparison to the regular counter.
224224The tradeoff is that running tracing and/or debugging may interfere
225225with the counter functionality.
226226
227- A call to ` exometer:update() ` will add the provided value to the
227+ A call to ` exometer:update/2 ` will add the provided value to the
228228counter.
229229
230- The counter can be reset to zero through ` exometer:reset() ` .
230+ The counter can be reset to zero through ` exometer:reset/1 ` .
231231
232232The available data points under a metric using the fast_counter
233233entry are ` value ` and ` ms_since_reset ` .
@@ -236,11 +236,11 @@ entry are `value` and `ms_since_reset`.
236236#### <a name =" gauge_(exometer_native) " >gauge (exometer native)</a > ####
237237
238238The gauge is implemented directly in ` exometer ` to provide simple
239- gauges. A call to ` exometer:update() ` will set the gauge's value
239+ gauges. A call to ` exometer:update/2 ` will set the gauge's value
240240to the provided value. That is, the value of the gauge entry is
241241always the most recently provided value.
242242
243- The gauge can be reset to zero through ` exometer:reset() ` .
243+ The gauge can be reset to zero through ` exometer:reset/1 ` .
244244
245245The available data points under a metric using the gauge entry
246246are ` value ` and ` ms_since_reset ` .
@@ -249,7 +249,7 @@ are `value` and `ms_since_reset`.
249249#### <a name =" exometer_histogram_(probe) " >exometer_histogram (probe)</a > ####
250250
251251The histogram probe stores a given number of updates, provided through
252- ` exometer:update() ` , in a histogram. The histogram maintains a log
252+ ` exometer:update/2 ` , in a histogram. The histogram maintains a log
253253derived from all values received during a configurable time span and
254254provides min, max, median, mean, and percentile analysis data points
255255for the stored data.
@@ -266,7 +266,7 @@ resource consumption.
266266#### <a name =" exometer_uniform_(probe) " >exometer_uniform (probe)</a > ####
267267
268268The uniform probe provides a uniform sample over a pool of values
269- provided through ` exometer:update() ` . When the pool reaches its configurable
269+ provided through ` exometer:update/2 ` . When the pool reaches its configurable
270270max size, existing values will be replaced at random to make space for
271271new values. Much like ` exometer_histogram ` , the uniform probe
272272provides min, max, median, mean, and percentile analysis data points
@@ -277,7 +277,7 @@ for the stored data.
277277
278278The spiral probe maintains the total sum of all values stored in its
279279histogram. The histogram has a configurable time span, all values
280- provided to the probe, through ` exometer:update() ` , within that time
280+ provided to the probe, through ` exometer:update/2 ` , within that time
281281span will be summed up and reported. If, for example, the histogram
282282covers 60 seconds, the spiral probe will report the sum of all
283283values reported during the last minute.
@@ -290,7 +290,7 @@ probe is also available.
290290
291291The function entry allows for a simple caller-supplied function to be
292292invoked in order to retrieve non-exometer data. The
293- ` exometer_function:get_value() ` function will invoke a
293+ ` exometer_function:get_value/4 ` function will invoke a
294294` Module:Function(DataPoints) ` call, where ` Module ` and
295295` Function ` are provided by the caller.
296296
@@ -358,25 +358,25 @@ under the given metric.
358358
359359#### <a name =" Deleting_metrics " >Deleting metrics</a > ####
360360
361- A metric previously created with ` exometer:new() ` can be deleted by
362- ` exometer:delete() ` .
361+ A metric previously created with ` exometer:new/2 ` can be deleted by
362+ ` exometer:delete/1 ` .
363363
364364All subscriptions to the deleted metrics will be cancelled.
365365
366366
367367#### <a name =" Setting_metric_values " >Setting metric values</a > ####
368368
369369A created metric can have its value updated through the
370- ` exometer:update() ` function:
370+ ` exometer:update/2 ` function:
371371
372372``` erlang
373373
374374exometer :update (Name , Value )
375375```
376376
377377The ` Name ` parameter is the same atom list provided to a previous
378- ` exometer:new() ` call. The ` Value ` is an arbitrarty element that is
379- forwarded to the ` exometer:update() ` function of the entry/probe that the
378+ ` exometer:new/2 ` call. The ` Value ` is an arbitrarty element that is
379+ forwarded to the ` exometer:update/2 ` function of the entry/probe that the
380380metric is mapped to.
381381
382382The receiving entry/probe will process the provided value and modify
@@ -395,8 +395,8 @@ exometer:info(Name, datapoints)
395395```
396396
397397The ` Name ` parameter is the same atom list provided to a previous
398- ` exometer:new() ` call. The call will return a list of data point
399- atoms that can then be provided to ` exometer:get_value() ` to
398+ ` exometer:new/2 ` call. The call will return a list of data point
399+ atoms that can then be provided to ` exometer:get_value/1 ` to
400400retrieve their actual value:
401401
402402``` erlang
@@ -554,7 +554,7 @@ called during upgrade, as it will re-apply the settings each time.
554554#### <a name =" Configuring_static_subscriptions " >Configuring static subscriptions</a > ####
555555
556556Static subscriptions, which are automatically setup at exometer
557- startup without having to invoke ` exometer_report:subscribe() ` , are
557+ startup without having to invoke ` exometer_report:subscribe/4 ` , are
558558configured through the report sub section under exometer.
559559
560560Below is an example, from ` exometer/priv/app.config ` :
@@ -602,7 +602,7 @@ The meaning of the above tuple elements is:
602602+ ` Reporter :: module() ` <br />Specifies the reporter plugin module, such as` exometer_report_collectd ` that is to receive updated metric's data
603603points.
604604
605- + ` Metric :: [atoms()] ` <br />Specifies the path to a metric previously created with an` exometer:new() ` call.
605+ + ` Metric :: [atoms()] ` <br />Specifies the path to a metric previously created with an` exometer:new/2 ` call.
606606
607607+ ` DataPoint ` :: atom() | [ atom()] '<br />Specifies the data point within the given metric to send to the
608608 receiver. The data point must match one of the data points returned by` exometer:info(Name, datapoints) ` for the given metrics name.
0 commit comments