Skip to content

Commit

Permalink
add check for proxy switch in main as well
Browse files Browse the repository at this point in the history
  • Loading branch information
lokesh.balla committed Mar 18, 2024
1 parent 0e00245 commit 123f88a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/tracing-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ func main() {
prxy := proxy.NewProxy(c.GetProxyConfig(), opsrampAPI, logsEndpoint, authConfig.Endpoint, c.GetMetricsConfig().OpsRampAPI)
prxy.Logger = lgr
// connect to working proxy at start-up
_ = prxy.SwitchProxy()

lgr.Info().Logf("valid proxy config received: %d", prxy.Len())
if prxy.Enabled() {
_ = prxy.SwitchProxy()
lgr.Info().Logf("valid proxy config received: %d", prxy.Len())
}

userAgentAddition := "tracing-proxy/" + CollectorVersion
upstreamClient, err := libtrace.NewClient(libtrace.ClientConfig{ // nolint:all
Expand Down

0 comments on commit 123f88a

Please sign in to comment.