Skip to content

Commit

Permalink
updated query logging
Browse files Browse the repository at this point in the history
linter fix
  • Loading branch information
alexey-kremsa-globant committed Sep 4, 2020
1 parent 4780b9f commit 325150d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions internal/app/evaluator/evaluator_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,11 @@ import (
"io"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"go.opencensus.io/stats"
"golang.org/x/sync/errgroup"
"open-match.dev/open-match/pkg/pb"
)

var (
logger = logrus.WithFields(logrus.Fields{
"app": "openmatch",
"component": "evaluator.harness.golang",
})
)

// Evaluator is the function signature for the Evaluator to be implemented by
// the user. The harness will pass the Matches to evaluate to the Evaluator
// and the Evaluator will return an accepted list of Matches.
Expand Down
4 changes: 2 additions & 2 deletions internal/app/query/query_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (s *queryService) QueryTickets(req *pb.QueryTicketsRequest, responseServer
}
})
if err != nil {
logger.WithError(err).Error("Failed to run request.")
err = errors.Wrap(err, "QueryTickets: failed to run request")
return err
}
stats.Record(ctx, ticketsPerQuery.M(int64(len(results))))
Expand Down Expand Up @@ -111,7 +111,7 @@ func (s *queryService) QueryTicketIds(req *pb.QueryTicketIdsRequest, responseSer
}
})
if err != nil {
logger.WithError(err).Error("Failed to run request.")
err = errors.Wrap(err, "QueryTicketIds: failed to run request")
return err
}
stats.Record(ctx, ticketsPerQuery.M(int64(len(results))))
Expand Down

0 comments on commit 325150d

Please sign in to comment.