Fix missing remote read spans (#7914) (#7916)

The remote read client needs to use the nethttp.Transport wrapper in
order for spans to be instrumented properly.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>

Co-authored-by: Chris Marchbanks <csmarchbanks@gmail.com>
This commit is contained in:
Julien Pivotto 2020-09-09 17:39:59 +02:00 committed by GitHub
parent e55b0be9b7
commit 538f6b7dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -109,6 +109,11 @@ func newReadClient(name string, conf *ClientConfig) (ReadClient, error) {
return nil, err
}
t := httpClient.Transport
httpClient.Transport = &nethttp.Transport{
RoundTripper: t,
}
return &Client{
remoteName: name,
url: conf.URL,