Skip to content

Commit 858b670

Browse files
acogoluegnesmergify[bot]
authored andcommitted
Fix Prometheus and dependencies loading
A new dependency of the Prometheus library (ddskerl) is not loaded properly, breaking stop_app in some occasions. Per discussion with @lhoguin and @dumbbell. References #14885 (cherry picked from commit 4d0f93e)
1 parent ace41a9 commit 858b670

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

deps/rabbit/src/rabbit.erl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,9 +1055,10 @@ do_run_postlaunch_phase(Plugins) ->
10551055
%% * Collectors: the `rabbitmq_prometheus' plugin explicitly registers
10561056
%% all collectors.
10571057
%% * Instrumenters: no instrumenters are used.
1058-
_ = application:load(prometheus),
1059-
ok = application:set_env(prometheus, collectors, [default]),
1060-
ok = application:set_env(prometheus, instrumenters, []),
1058+
ok = application:set_env(prometheus, collectors, [default],
1059+
[{persistent, true}]),
1060+
ok = application:set_env(prometheus, instrumenters, [],
1061+
[{persistent, true}]),
10611062

10621063
%% However, we want to run their boot steps and actually start
10631064
%% them one by one, to ensure a dependency is fully started

0 commit comments

Comments
 (0)