]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_prometheus: Do not generate broken metrics
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>
Fri, 7 Apr 2023 09:44:44 +0000 (17:44 +0800)
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>
Fri, 4 Aug 2023 14:21:18 +0000 (14:21 +0000)
commita10de8bc720b537a8ae7fa713b660aef7b0974d2
tree2eff26afec64370f698e7fe57851001a4acbe9b9
parentb5762cd54e8c169646f3c52f522512f4bed53ac1
res_prometheus: Do not generate broken metrics

In 8d6fdf9c3adede201f0ef026dab201b3a37b26b6 invisible bridges were
skipped but that lead to producing metrics with no name and no help.

Keep track of the number of metrics configured and then only emit these.
Add a basic testcase that verifies that there is no '(NULL)' in the
output.

ASTERISK-30474
res/prometheus/bridges.c
tests/test_res_prometheus.c