diff --git a/pkg/solver/controller.go b/pkg/solver/controller.go index c7de7be9..fba1b6e8 100644 --- a/pkg/solver/controller.go +++ b/pkg/solver/controller.go @@ -307,9 +307,15 @@ func (controller *SolverController) solve(ctx context.Context) error { span.AddEvent("report_deal_metrics.start") storedDeals, err := controller.store.GetDealsAll() if err != nil { + span.SetStatus(codes.Error, "get all deals failed") + span.RecordError(err) return err } - reportDealMetrics(ctx, controller.meter, storedDeals) + err = reportDealMetrics(ctx, controller.meter, storedDeals) + if err != nil { + span.SetStatus(codes.Error, "report deal metrics failed") + span.RecordError(err) + } span.AddEvent("report_deal_metrics.done") return nil