Behaviours: gen_server.
This module defines the exometer_folsom_monitor behaviour.
Required callback functions: copy_folsom/3.
Hook API for following folsom-based legacy code with exometer
This module installs hooks into folsom, allowing subscribers to trap the creation of metrics using the folsom API, and instruct exometer to create matching metrics entries.
Subscriptions identify a module that should be on the call stack when a module is created (when testing from the shell, use the moduleshell),
and a callback module which is used to retrieve the specs for exometer
metrics to create.
| monitor/2 | Monitor a legacy module. |
| start_link/0 | Start the server (called automatically by exometer). |
monitor(FromMod::atom(), Callback::atom()) -> ok
Monitor a legacy module.
FromMod is the name of a module that should appear on the call stack
when a call to folsom_metrics:new_<Type> is made (or '_',
which will match any call stack). Callback is a callback module,
exporting the function copy_folsom(Name,Type,Opts), which returns a
{Name, Type, Options} tuple, a list of such tuples, or the atom false.
exometer_folsom_monitor
process, so the call stack will not contain the legacy modules.
However, if the corresponding exometer metrics end up calling other
folsom-based metrics (e.g. using the exometer_folsom module), there
will be a risk of generating a loop.
start_link() -> any()
Start the server (called automatically by exometer).
Generated by EDoc