]> 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:21 +0000 (14:21 +0000)
commit9b93fb9f67863a949062c7c1752165d10e18a372
treeb48753bb3db228acfcb83662def8dc14772a79bc
parent8e23f3e3133713574aedba56d9d4e241a5b4caba
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