Skip to content

Commit 452a28e

Browse files
committed
[receiver/prometheus] Add fallback_scrape_protocol when using target allocator
This applies a similar fix as 72b834b, but when using TargetAllocator. Signed-off-by: MATILLAT Quentin <[email protected]>
1 parent 6dc691e commit 452a28e

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

receiver/prometheusreceiver/targetallocator/manager.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ func (m *Manager) sync(compareHash uint64, httpClient *http.Client) (uint64, err
150150
scrapeConfig.HTTPClientConfig = commonconfig.HTTPClientConfig(*m.cfg.HTTPScrapeConfig)
151151
}
152152

153+
if scrapeConfig.ScrapeFallbackProtocol == "" {
154+
scrapeConfig.ScrapeFallbackProtocol = promconfig.PrometheusText0_0_4
155+
}
156+
153157
m.promCfg.ScrapeConfigs = append(m.promCfg.ScrapeConfigs, scrapeConfig)
154158
}
155159

0 commit comments

Comments
 (0)