summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/httpclient.go3
-rw-r--r--internal/config/config.go14
2 files changed, 6 insertions, 11 deletions
diff --git a/client/httpclient.go b/client/httpclient.go
index 1ae4420..0dcec94 100644
--- a/client/httpclient.go
+++ b/client/httpclient.go
@@ -14,6 +14,7 @@ import (
log "github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/labkit/correlation"
+ "gitlab.com/gitlab-org/labkit/tracing"
)
const (
@@ -85,7 +86,7 @@ func NewHTTPClientWithOpts(gitlabURL, gitlabRelativeURLRoot, caFile, caPath stri
}
c := &http.Client{
- Transport: correlation.NewInstrumentedRoundTripper(transport),
+ Transport: correlation.NewInstrumentedRoundTripper(tracing.NewRoundTripper(transport)),
Timeout: readTimeout(readTimeoutSeconds),
}
diff --git a/internal/config/config.go b/internal/config/config.go
index 71e7840..4c75ad5 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -10,7 +10,6 @@ import (
"sync"
"time"
- "gitlab.com/gitlab-org/labkit/tracing"
yaml "gopkg.in/yaml.v2"
"gitlab.com/gitlab-org/gitlab-shell/client"
@@ -73,9 +72,9 @@ var (
Listen: "[::]:22",
WebListen: "localhost:9122",
ConcurrentSessionsLimit: 10,
- GracePeriodSeconds: 10,
- ReadinessProbe: "/start",
- LivenessProbe: "/health",
+ GracePeriodSeconds: 10,
+ ReadinessProbe: "/start",
+ LivenessProbe: "/health",
HostKeyFiles: []string{
"/run/secrets/ssh-hostkeys/ssh_host_rsa_key",
"/run/secrets/ssh-hostkeys/ssh_host_ecdsa_key",
@@ -96,7 +95,7 @@ func (c *Config) ApplyGlobalState() {
func (c *Config) HttpClient() *client.HttpClient {
c.httpClientOnce.Do(func() {
- client := client.NewHTTPClient(
+ c.httpClient = client.NewHTTPClient(
c.GitlabUrl,
c.GitlabRelativeURLRoot,
c.HttpSettings.CaFile,
@@ -104,11 +103,6 @@ func (c *Config) HttpClient() *client.HttpClient {
c.HttpSettings.SelfSignedCert,
c.HttpSettings.ReadTimeoutSeconds,
)
-
- tr := client.Transport
- client.Transport = tracing.NewRoundTripper(tr)
-
- c.httpClient = client
})
return c.httpClient