Skip to content

Commit 0caea22

Browse files
Assertions for #11743
1 parent e9b5f52 commit 0caea22

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

deps/rabbitmq_prometheus/src/collectors/prometheus_rabbitmq_core_metrics_collector.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
-define(METRICS_RAW, [
5959

60-
%%% Those are global, i.e. they contain no reference to queue/vhost/channel
60+
%% Global metrics, as in, they contain no references to queues, virtual hosts or channel
6161
{connection_churn_metrics, [
6262
{2, undefined, connections_opened_total, counter, "Total number of connections opened"},
6363
{3, undefined, connections_closed_total, counter, "Total number of connections closed or terminated"},

deps/rabbitmq_prometheus/test/rabbit_prometheus_http_SUITE.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,10 @@ aggregated_metrics_test(Config) ->
387387
?assertEqual(match, re:run(Body, "^rabbitmq_queue_consumers ", [{capture, none}, multiline])),
388388
?assertEqual(match, re:run(Body, "TYPE rabbitmq_auth_attempts_total", [{capture, none}, multiline])),
389389
?assertEqual(nomatch, re:run(Body, "TYPE rabbitmq_auth_attempts_detailed_total", [{capture, none}, multiline])),
390+
%% Memory breakdown
391+
?assertEqual(match, re:run(Body, "^rabbitmq_memory_quorum_queue_erlang_process_bytes ", [{capture, none}, multiline])),
392+
?assertEqual(match, re:run(Body, "^rabbitmq_memory_classic_queue_erlang_process_bytes ", [{capture, none}, multiline])),
393+
?assertEqual(match, re:run(Body, "^rabbitmq_memory_binary_heap_bytes ", [{capture, none}, multiline])),
390394
%% Check the first metric value in each ETS table that requires converting
391395
?assertEqual(match, re:run(Body, "^rabbitmq_erlang_uptime_seconds ", [{capture, none}, multiline])),
392396
?assertEqual(match, re:run(Body, "^rabbitmq_io_read_time_seconds_total ", [{capture, none}, multiline])),

0 commit comments

Comments
 (0)