From 5531b5e7bd47c4357576d91af18c6357cc7c1a28 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Wed, 15 Mar 2023 07:03:51 -0400 Subject: [PATCH] Log prometheus errors instead of returning --- engine/stats.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/engine/stats.go b/engine/stats.go index d7e4e0bed..40ec3fb1d 100644 --- a/engine/stats.go +++ b/engine/stats.go @@ -361,8 +361,9 @@ func (sS *StatS) processEvent(ctx *context.Context, tnt string, args *utils.CGRE } } - if sS.processThresholds(ctx, matchSQs, args.APIOpts) != nil || - withErrors { + + err = sS.processThresholds(ctx, matchSQs, args.APIOpts) + if withErrors { err = utils.ErrPartiallyExecuted } @@ -373,7 +374,10 @@ func (sS *StatS) processEvent(ctx *context.Context, tnt string, args *utils.CGRE } if len(promIDs) != 0 { if err = exportToPrometheus(matchSQs, utils.NewStringSet(promIDs)); err != nil { - return + utils.Logger.Warning( + fmt.Sprintf(" Failed to export the queues to Prometheus: error: %s", + err.Error())) + err = utils.ErrPartiallyExecuted } } return