View Source exometer_info (exometer_core v1.7.1)
Accessor function for exometer data structures
This module uses the exprecs transform (see exprecs) to generate accessor functions for exometer data structures.
Note that thevalue
attribute in exometer_entry{}
records may not represent the true value of the metric, since exometer entries often have structured values, or are represented as CRDTs for update efficiency.
Summary
Functions
Pretty-print a record, or list containing records.
exometer:find_entries(Path) & returns pretty-printed result. This function calls `exometer:find_entries(Path)
, retrieves the entry for each matching metric, and calls pp(Entry)
for each entry.Performs a lookup by name of entry and pretty-prints the result.
Performs exometer:select(Pattern) & returns pretty-printed result. This function calls `exometer:select(Pattern)
, retrieves the entry for each matching metric, and calls pp(Entry)
for each entry.
Return the operational status of the given exometer entry.
Types
Functions
Pretty-print a record, or list containing records.
This function pretty-prints a record as{RecordName, [{Attr,Value}]}
, or, if the input is a list, recognizes records and pretty-prints them, leaving other data structures unchanged.
exometer:find_entries(Path) & returns pretty-printed result. This function calls `exometer:find_entries(Path)
, retrieves the entry for each matching metric, and calls pp(Entry)
for each entry.
-spec pp_lookup(exometer:name()) -> pp() | undefined.
Performs a lookup by name of entry and pretty-prints the result.
This function returnsundefined
if the entry cannot be found.
-spec pp_select(ets:match_spec()) -> [pp()].
Performs exometer:select(Pattern) & returns pretty-printed result. This function calls `exometer:select(Pattern)
, retrieves the entry for each matching metric, and calls pp(Entry)
for each entry.
{Name, Type, Status}
object, e.g. by specifying ['$_']
.
-spec status(exometer:entry()) -> enabled | disabled.
Return the operational status of the given exometer entry.
Thestatus
attribute is overloaded in the #exometer_entry{}
record. This function extracts the correct status (enabled | disabled
).