From 125df08c72778084153774982b0a43c8dee9abd1 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 20 Jun 2024 12:28:22 -0400 Subject: [PATCH] close metrics (#103) --- baseapp/job_manager.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/baseapp/job_manager.go b/baseapp/job_manager.go index 4b833ab..f6215cb 100644 --- a/baseapp/job_manager.go +++ b/baseapp/job_manager.go @@ -126,6 +126,11 @@ func (jm *JobManager) Stop() { // Wait for both to finish. wg.Wait() + + // Close the metrics. + if err := jm.ctxFactory.metrics.Close(); err != nil { + jm.ctxFactory.logger.Error("failed to close metrics", "err", err) + } } // RunProducers sets up each job and runs its producer.