Skip to content

Commit

Permalink
rabbit_stream_consumer -> stream_consumer_metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
markus812498 committed Dec 5, 2023
1 parent 3c645e9 commit 4d0a8c4
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@
{5, undefined, queue_process_reductions_total, counter, "Total number of queue process reductions"}
]},

{stream_consumer_metrics, [
{2, undefined, stream_consumer_offset, counter, "Total nunber of offset", offset},
{2, undefined, stream_consumer_offset_lag, counter, "Total offset lag of connection", offset_lag},
{2, undefined, stream_consumer_consumed_total, counter, "Total number of messages consumed on connection", consumed}
]},

{queue_consumer_count, [
{2, undefined, queue_consumers, gauge, "Consumers on a queue", consumers}
]},
Expand Down Expand Up @@ -302,7 +308,7 @@ mutually_exclusive_mf(false, auth_attempt_detailed_metrics, _) ->
%% `proplists:get_value/2` calls.
mutually_exclusive_mf(_, queue_consumer_count, MFs) ->
lists:keymember(queue_metrics, 1, MFs);
%%mutually_exclusive_mf(_, rabbit_stream_consumer, MFs) ->
%%mutually_exclusive_mf(_,stream_consumer_metric, MFs) ->
%% lists:keymember(rabbit_stream_consumer_created, 1, MFs);
mutually_exclusive_mf(_, _, _) ->
false.
Expand Down Expand Up @@ -537,8 +543,8 @@ get_data(rabbit_stream_publisher_created = Table, false, _, _) ->
}
end, empty(Table), Table),
[{Table, [{published, A1}, {confirmed, A2}, {errored, A3}]}];
%%get_data(rabbit_stream_consumer, true, _, _) ->
%% ets:tab2list(rabbit_stream_consumer_created);
%get_data(stream_consumer_metrics, true, _, _) ->
% ets:tab2list(rabbit_stream_consumer_created);
get_data(rabbit_stream_consumer_created = Table, false, _, _) ->
%% Table = rabbit_stream_consumer_created, %% real table name
{Table, A1, A2, A3} = ets:foldl(fun({_, Props}, {T, A1, A2, A3}) ->
Expand Down

0 comments on commit 4d0a8c4

Please sign in to comment.