Skip to content

Commit

Permalink
put reporter init after app startup
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Aug 7, 2023
1 parent 4433414 commit 9b757d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/metrics/mongoose_metrics.erl
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ init() ->
create_vm_metrics(),
create_global_metrics(?GLOBAL_COUNTERS),
create_data_metrics(),
create_host_type_metrics(),
init_subscriptions().
create_host_type_metrics().

-spec init_mongooseim_metrics() -> ok.
init_mongooseim_metrics() ->
create_host_type_hook_metrics(),
create_global_metrics(?MNESIA_COUNTERS).
create_global_metrics(?MNESIA_COUNTERS),
init_subscriptions().

init_subscriptions() ->
Reporters = exometer_report:list_reporters(),
Expand Down
1 change: 1 addition & 0 deletions test/mongooseim_metrics_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ end_per_suite(C) ->
init_per_group(Group, C) ->
[mongoose_config:set_opt(Key, Value) || {Key, Value} <- opts(Group)],
mongoose_metrics:init(),
mongoose_metrics:init_mongooseim_metrics(),
C.

end_per_group(Group, C) ->
Expand Down

0 comments on commit 9b757d6

Please sign in to comment.