%%% @doc The fuse_stats_plugin behaviour. %%% All {@link fuse} stats plugins implement the callbacks defined in this %%% %%% behaviour. %%% %%% As EDoc does not yet support @@doc tags for the `-callback' method of %%% behaviour specification, documentation on the callbacks is included here. %%% See the source for the callback type annotations. %%% %%% Note that since metrics export is very much a secondary function of fuse, %%% plugins should consider their work "best effort" and as such not crash on %%% e.g. a badmatch. %%% %%% === init/1 === %%% Handles plugin initialization. %%% %%% The implementation must create counters and/or whatever is necessary to %%% setup the plugin's statistics store. %%% %%% === increment/2 === %%% Increments a counter. %%% %%% The implementation must update or notify counters, spirals or whatever %%% the underlying implementation is. -module(fuse_stats_plugin). -callback init(Name :: atom()) -> ok. -callback increment(Name :: atom(), Counter :: ok | blown | melt) -> ok.