Skip to content

Commit

Permalink
chore: Add report deal metrics trace errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bgins committed Nov 19, 2024
1 parent 99bda97 commit ee55054
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/solver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee55054

Please sign in to comment.