Add a context object in nebula.Main to clean up on error (#550)

This commit is contained in:
brad-defined
2021-11-02 14:14:26 -04:00
committed by GitHub
parent 32cd9a93f1
commit 6ae8ba26f7
13 changed files with 139 additions and 40 deletions

View File

@@ -93,7 +93,9 @@ func startPrometheusStats(l *logrus.Logger, i time.Duration, c *Config, buildVer
pr := prometheus.NewRegistry()
pClient := mp.NewPrometheusProvider(metrics.DefaultRegistry, namespace, subsystem, pr, i)
go pClient.UpdatePrometheusMetrics()
if !configTest {
go pClient.UpdatePrometheusMetrics()
}
// Export our version information as labels on a static gauge
g := prometheus.NewGauge(prometheus.GaugeOpts{