Log prometheus errors instead of returning

This commit is contained in:
ionutboangiu
2023-03-15 07:03:51 -04:00
committed by Dan Christian Bogos
parent 39f063d86a
commit 5531b5e7bd

View File

@@ -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("<StatS> Failed to export the queues to Prometheus: error: %s",
err.Error()))
err = utils.ErrPartiallyExecuted
}
}
return