Make rabbit_global_counters:overview/0 generally available

Previously it was only available when TEST=1 was set.
This commit is contained in:
Loïc Hoguin 2024-09-25 15:42:37 +02:00
parent 4530fb5d97
commit addb0607fd
No known key found for this signature in database
GPG Key ID: C69E26E3A9DF618F
1 changed files with 1 additions and 6 deletions

View File

@ -13,6 +13,7 @@
boot_step/0,
init/1,
init/2,
overview/0,
prometheus_format/0,
increase_protocol_counter/3,
messages_received/2,
@ -37,10 +38,6 @@
messages_dead_lettered_confirmed/3
]).
-ifdef(TEST).
-export([overview/0]).
-endif.
%% PROTOCOL COUNTERS:
-define(MESSAGES_RECEIVED, 1).
-define(MESSAGES_RECEIVED_CONFIRM, 2).
@ -197,10 +194,8 @@ init(Labels = [{queue_type, QueueType}, {dead_letter_strategy, DLS}], DeadLetter
Counters = seshat:new(?MODULE, Labels, DeadLetterCounters),
persistent_term:put({?MODULE, QueueType, DLS}, Counters).
-ifdef(TEST).
overview() ->
seshat:overview(?MODULE).
-endif.
prometheus_format() ->
seshat:format(?MODULE).