Skip to content

Commit 290889b

Browse files
committed
Include sessions in format_status/1
Include monitored session pids in format_status/1 of rabbit_amqp_writer. They could be useful when debugging. The maximum number of sessions per connection is limited, hence the output won't be too large.
1 parent 84eda12 commit 290889b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

deps/rabbit/src/rabbit_amqp_writer.erl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,15 @@ format_status(Status) ->
148148
fun(#state{sock = Sock,
149149
reader = Reader,
150150
pending = Pending,
151-
pending_size = PendingSize}) ->
151+
pending_size = PendingSize,
152+
monitored_sessions = Sessions
153+
}) ->
152154
#{socket => Sock,
153155
reader => Reader,
154156
%% Below 2 fields should always have the same value.
155157
pending => iolist_size(Pending),
156-
pending_size => PendingSize}
158+
pending_size => PendingSize,
159+
monitored_sessions => maps:keys(Sessions)}
157160
end,
158161
Status).
159162

0 commit comments

Comments
 (0)