Merge pull request #902 from breed808/textfile

Move textfile mtime metric from loop
This commit is contained in:
Ben Reedy 2022-01-02 08:32:08 +10:00 committed by GitHub
commit 27ceeecff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -313,10 +313,11 @@ fileLoop:
} else {
for _, mf := range metricFamilies {
convertMetricFamily(mf, ch)
c.exportMTimes(mtimes, ch)
}
}
c.exportMTimes(mtimes, ch)
// Export if there were errors.
ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(