diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-11 18:10:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-11 18:10:32 +0300 |
commit | ec971a05e380fa580ae75dea30ab963112096525 (patch) | |
tree | 33d9fee648491f9900024ba25e681535a7684997 /workhorse/internal/badgateway | |
parent | f469daf1dc805d4c6a689067094112d4ed68d775 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/internal/badgateway')
-rw-r--r-- | workhorse/internal/badgateway/roundtripper.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/workhorse/internal/badgateway/roundtripper.go b/workhorse/internal/badgateway/roundtripper.go index a36cc9f4a9a..71bee12ead7 100644 --- a/workhorse/internal/badgateway/roundtripper.go +++ b/workhorse/internal/badgateway/roundtripper.go @@ -9,9 +9,7 @@ import ( "strings" "time" - "gitlab.com/gitlab-org/labkit/log" - - "gitlab.com/gitlab-org/gitlab-workhorse/internal/helper" + "gitlab.com/gitlab-org/gitlab-workhorse/internal/log" ) // Error is a custom error for pretty Sentry 'issues' @@ -42,11 +40,7 @@ func (t *roundTripper) RoundTrip(r *http.Request) (*http.Response, error) { // instead of 500s we catch the RoundTrip error here and inject a // 502 response. fields := log.Fields{"duration_ms": int64(time.Since(start).Seconds() * 1000)} - helper.LogErrorWithFields( - r, - &sentryError{fmt.Errorf("badgateway: failed to receive response: %v", err)}, - fields, - ) + log.WithRequest(r).WithFields(fields).WithError(&sentryError{fmt.Errorf("badgateway: failed to receive response: %v", err)}).Error() injectedResponse := &http.Response{ StatusCode: http.StatusBadGateway, |