Skip to content

Commit

Permalink
Redo removed functions from amoc
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Jan 19, 2024
1 parent 0cf1e9d commit 97efcd4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/amoc_metrics.erl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ maybe_add_reporter() ->
case lists:keyfind(Reporter, 1, exometer_report:list_reporters()) of
{Reporter, _} -> ok;
_->
case amoc_config_env:get(graphite_host) of
case amoc_config_env:get(graphite_host, undefined) of
undefined -> ok;
Host ->
Prefix = amoc_config_env:get(graphite_prefix, net_adm:localhost()),
Expand Down Expand Up @@ -114,5 +114,6 @@ maybe_subscribe(ExName, Datapoints) ->
end.

maybe_init_predefined_metrics() ->
Preconfigured = amoc_config_utils:find_all_vars(predefined_metrics),
App = application:get_application(?MODULE),
Preconfigured = application:get_env(App, predefined_metrics, []),
[init(Type, Name) || {Type, Name} <- lists:flatten(Preconfigured)].

0 comments on commit 97efcd4

Please sign in to comment.