Skip to content

Commit ba10203

Browse files
committed
fix
1 parent 115eb63 commit ba10203

File tree

1 file changed

+3
-0
lines changed
  • receiver/prometheusreceiver/targetallocator

1 file changed

+3
-0
lines changed

receiver/prometheusreceiver/targetallocator/manager.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ func (d *dynamicTLSRoundTripper) RoundTrip(req *http.Request) (*http.Response, e
122122
}
123123
clone := d.base.Clone()
124124
clone.TLSClientConfig = tlsCfg
125+
clone.DisableKeepAlives = true
125126
client := &http.Client{Transport: clone}
126127
return client.Do(req)
127128
}
@@ -168,6 +169,8 @@ func createDynamicTLSConfig(cfg *Config) (*tls.Config, error) {
168169
return tlsCfg, nil
169170
}
170171

172+
// sync request jobs from targetAllocator and update underlying receiver, if the response does not match the provided compareHash.
173+
// baseDiscoveryCfg can be used to provide additional ScrapeConfigs which will be added to the retrieved jobs.
171174
func (m *Manager) sync(compareHash uint64, httpClient *http.Client) (uint64, error) {
172175
m.settings.Logger.Debug("Syncing target allocator jobs")
173176
m.settings.Logger.Debug("endpoint", zap.String("endpoint", m.cfg.Endpoint))

0 commit comments

Comments
 (0)