]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
stats: Allow empty event exporters when registering metrics
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Thu, 15 Jun 2023 11:32:11 +0000 (13:32 +0200)
committerDovecot Automation <automation@dovecot.org>
Thu, 31 Aug 2023 06:21:53 +0000 (06:21 +0000)
src/stats/stats-metrics.c

index e63edaef5bb80a780d3d7304054960c325fd6277..b582bb4f0066b8c03e90a304c4ef60004ba1290d 100644 (file)
@@ -193,6 +193,10 @@ stats_metrics_check_for_exporter(struct stats_metrics *metrics, const char *name
 {
        struct exporter *exporter;
 
+       /* Allow registering metrics with empty/missing exporters. */
+       if (name[0] == '\0')
+               return TRUE;
+
        if (!array_is_created(&metrics->exporters))
                return FALSE;