summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_channel.erl19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index b0ccf9fb41..d99a1c038a 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -56,18 +56,21 @@
-define(MAX_PERMISSION_CACHE_SIZE, 12).
-define(FLOW_OK_TIMEOUT, 10000). %% 10 seconds
--define(INFO_KEYS,
+-define(STATISTICS_KEYS,
[pid,
- connection,
- number,
- user,
- vhost,
transactional,
consumer_count,
messages_unacknowledged,
acks_uncommitted,
prefetch_count]).
+-define(INFO_KEYS,
+ [connection,
+ number,
+ user,
+ vhost]
+ ++ ?STATISTICS_KEYS).
+
%%----------------------------------------------------------------------------
-ifdef(use_specs).
@@ -1190,9 +1193,9 @@ maybe_emit_stats(State = #ch{exchange_statistics = ExchangeStatistics,
true ->
rabbit_event:notify(
channel_stats,
- [{pid, self()},
- {per_exchange_statistics, dict:to_list(ExchangeStatistics)},
- {per_queue_statistics, dict:to_list(QueueStatistics)}]),
+ [{Item, i(Item, State)} || Item <- ?STATISTICS_KEYS] ++
+ [{per_exchange_statistics, dict:to_list(ExchangeStatistics)},
+ {per_queue_statistics, dict:to_list(QueueStatistics)}]),
State#ch{last_statistics_update = Now};
_ ->
State