Skip to content

Commit

Permalink
proxy module: update stats (#2907)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlettperry authored Jan 19, 2024
1 parent a8b10a5 commit a207be6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/module/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,15 @@ func (m *mod) RequestProxy(ctx context.Context, req *proxyv1.RequestProxyRequest
if err != nil {
m.scope.Tagged(map[string]string{
"service": service.Name,
"path": req.Path,
}).Counter("request.error").Inc(1)
m.logger.Error("proxy request error", zap.Error(err))
return nil, err
}

m.scope.Tagged(map[string]string{
"service": service.Name,
"path": req.Path,
"status_code": fmt.Sprintf("%d", response.StatusCode),
}).Counter("request").Inc(1)

Expand Down

0 comments on commit a207be6

Please sign in to comment.