From db894159c511b42ea25bc5bd990e1e97475fe1d0 Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Wed, 31 Jan 2024 09:27:05 +0530 Subject: [PATCH] fix: log error and continue on failed parsing of scraper --- cmd/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/server.go b/cmd/server.go index 6fc4d4e1..fa93eb2b 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -105,7 +105,8 @@ func startScraperCron(configFiles []string) { for _, scraper := range scraperConfigsDB { _scraper, err := v1.ScrapeConfigFromModel(scraper) if err != nil { - logger.Fatalf("Error parsing config scraper: %v", err) + logger.Errorf("Error parsing config scraper[%s]: %v", scraper.ID, err) + continue } scrapers.AddToCron(_scraper)