diff --git a/pkg/opentelemetry/otelhttpclient/client.go b/pkg/opentelemetry/otelhttpclient/client.go index b8c929fd..11ab68fa 100644 --- a/pkg/opentelemetry/otelhttpclient/client.go +++ b/pkg/opentelemetry/otelhttpclient/client.go @@ -6,18 +6,10 @@ import ( func New(name string, client *http.Client) *http.Client { if client == nil { - return NewClient(name) + return &http.Client{ + Transport: NewHTTPTransport(nil, name), + } } - return NewFromClient(client, name) -} - -func NewClient(name string) *http.Client { - return &http.Client{ - Transport: NewHTTPTransport(nil, name), - } -} - -func NewFromClient(httpClient *http.Client, name string) *http.Client { - httpClient.Transport = NewHTTPTransport(httpClient.Transport, name) - return httpClient + client.Transport = NewHTTPTransport(client.Transport, name) + return client }