diff options
author | Stan Hu <stanhu@gmail.com> | 2020-07-31 12:58:42 +0000 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2020-07-31 12:58:42 +0000 |
commit | 87402ed127d9855b8123e5e08a4c89d373cc79e8 (patch) | |
tree | 6a28feda2a62ec88e889593d7fbf3ae950659e35 /client/httpclient.go | |
parent | 701ebca0b5d4a8451afe677c3bdb19cc92a5a2f0 (diff) | |
download | gitlab-shell-87402ed127d9855b8123e5e08a4c89d373cc79e8.tar.gz |
Generate and log correlation IDs
This will make it easier to tie an SSH access request to Rails API and
Gitaly requests.
Diffstat (limited to 'client/httpclient.go')
-rw-r--r-- | client/httpclient.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/httpclient.go b/client/httpclient.go index ff0cc25..63386f7 100644 --- a/client/httpclient.go +++ b/client/httpclient.go @@ -10,6 +10,8 @@ import ( "path/filepath" "strings" "time" + + "gitlab.com/gitlab-org/labkit/correlation" ) const ( @@ -39,8 +41,9 @@ func NewHTTPClient(gitlabURL, caFile, caPath string, selfSignedCert bool, readTi return nil } + c := &http.Client{ - Transport: transport, + Transport: correlation.NewInstrumentedRoundTripper(transport), Timeout: readTimeout(readTimeoutSeconds), } |