rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
11.84k stars 3.9k forks source link

[Prometheus] Provide per-exchange/per-queue metrics #11559

Open LoisSotoLopez opened 1 week ago

LoisSotoLopez commented 1 week ago

Proposed Changes

Solves the issue explained at https://github.com/rabbitmq/rabbitmq-server/issues/11217

Types of Changes

Checklist

michaelklishin commented 1 week ago
cd deps/rabbitmq_prometheus
gmake tests

on this branch fails for me with

rabbit_prometheus_http_SUITE > per_object_metrics > globally_configure_per_object_metrics_test
    #1. {error,
            {{assertEqual,
                 [{module,rabbit_prometheus_http_SUITE},
                  {line,413},
                  {expression,
                      "re : run ( Body , \"^rabbitmq_queue_get_ack_total{\" , [ { capture , none } , multiline ] )"},
                  {expected,match},
                  {value,nomatch}]},
             [{rabbit_prometheus_http_SUITE,per_object_metrics_test,2,
                  [{file,"rabbit_prometheus_http_SUITE.erl"},{line,413}]},
              {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
              {test_server,run_test_case_eval1,6,
                  [{file,"test_server.erl"},{line,1302}]},
              {test_server,run_test_case_eval,9,
                  [{file,"test_server.erl"},{line,1234}]}]}}

rabbit_prometheus_http_SUITE > per_object_endpoint_metrics > endpoint_per_object_metrics
    #1. {error,
            {{assertEqual,
                 [{module,rabbit_prometheus_http_SUITE},
                  {line,413},
                  {expression,
                      "re : run ( Body , \"^rabbitmq_queue_get_ack_total{\" , [ { capture , none } , multiline ] )"},
                  {expected,match},
                  {value,nomatch}]},
             [{rabbit_prometheus_http_SUITE,per_object_metrics_test,2,
                  [{file,"rabbit_prometheus_http_SUITE.erl"},{line,413}]},
              {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
              {test_server,run_test_case_eval1,6,
                  [{file,"test_server.erl"},{line,1302}]},
              {test_server,run_test_case_eval,9,
                  [{file,"test_server.erl"},{line,1234}]}]}}

and one more error that can be inspected by opening logs/index.html after the CT test run.

LoisSotoLopez commented 6 days ago
cd deps/rabbitmq_prometheus
gmake tests

on this branch fails for me with

rabbit_prometheus_http_SUITE > per_object_metrics > globally_configure_per_object_metrics_test
    #1. {error,
            {{assertEqual,
                 [{module,rabbit_prometheus_http_SUITE},
                  {line,413},
                  {expression,
                      "re : run ( Body , \"^rabbitmq_queue_get_ack_total{\" , [ { capture , none } , multiline ] )"},
                  {expected,match},
                  {value,nomatch}]},
             [{rabbit_prometheus_http_SUITE,per_object_metrics_test,2,
                  [{file,"rabbit_prometheus_http_SUITE.erl"},{line,413}]},
              {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
              {test_server,run_test_case_eval1,6,
                  [{file,"test_server.erl"},{line,1302}]},
              {test_server,run_test_case_eval,9,
                  [{file,"test_server.erl"},{line,1234}]}]}}

rabbit_prometheus_http_SUITE > per_object_endpoint_metrics > endpoint_per_object_metrics
    #1. {error,
            {{assertEqual,
                 [{module,rabbit_prometheus_http_SUITE},
                  {line,413},
                  {expression,
                      "re : run ( Body , \"^rabbitmq_queue_get_ack_total{\" , [ { capture , none } , multiline ] )"},
                  {expected,match},
                  {value,nomatch}]},
             [{rabbit_prometheus_http_SUITE,per_object_metrics_test,2,
                  [{file,"rabbit_prometheus_http_SUITE.erl"},{line,413}]},
              {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
              {test_server,run_test_case_eval1,6,
                  [{file,"test_server.erl"},{line,1302}]},
              {test_server,run_test_case_eval,9,
                  [{file,"test_server.erl"},{line,1234}]}]}}

and one more error that can be inspected by opening logs/index.html after the CT test run.

Yep. Should be fixed up right now. Wasn't expecting the core team to look at draft PRs. Won't open them any more if that's the case. :+1: