export build version as a prometheus label (#405)

This is how Prometheus recommends you do it, and how they do it
themselves in their client. This makes it easy to see which versions you
have deployed in your fleet, and query over it too.
This commit is contained in:
Wade Simmons
2021-03-26 14:16:35 -04:00
committed by GitHub
parent 3ea7e1b75f
commit a71541fb0b
2 changed files with 19 additions and 4 deletions

View File

@ -396,7 +396,7 @@ func Main(config *Config, configTest bool, buildVersion string, logger *logrus.L
go lightHouse.LhUpdateWorker(ifce)
}
err = startStats(l, config, configTest)
err = startStats(l, config, buildVersion, configTest)
if err != nil {
return nil, NewContextualError("Failed to start stats emitter", nil, err)
}