Packages

Monitoring based on Telemetry + Prometheus

Current section

Files

Jump to
teleprom src teleprom_sup.erl
Raw

src/teleprom_sup.erl

%%%-------------------------------------------------------------------
%% @doc teleprom top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(teleprom_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_all, intensity => 10, period => 1},
ChildSpecs =
[
#{
id => teleprom_registry,
start => {teleprom_registry, start_link, []},
restart => permanent,
shutdown => 5000,
type => worker,
modules => [teleprom_registry]
}
],
{ok, {SupFlags, ChildSpecs}}.
%% internal functions