diff --git a/CHANGELOG.md b/CHANGELOG.md index 6147b7e3075..b2f5e4e5abd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,7 @@ * [BUGFIX] Frontend, Query-scheduler: allow querier to notify about shutdown without providing any authentication. #4066 * [BUGFIX] Querier: fixed race condition causing queries to fail right after querier startup with the "empty ring" error. #4068 * [BUGFIX] Compactor: Increment `cortex_compactor_runs_failed_total` if compactor failed compact a single tenant. #4094 +* [BUGFIX] Tracing: hot fix to avoid the Jaeger tracing client to indefinitely block the Cortex process shutdown in case the HTTP connection to the tracing backend is blocked. #4134 ## Blocksconvert diff --git a/cmd/cortex/main.go b/cmd/cortex/main.go index e9a7df19556..1d1b7027d34 100644 --- a/cmd/cortex/main.go +++ b/cmd/cortex/main.go @@ -153,10 +153,10 @@ func main() { } // Setting the environment variable JAEGER_AGENT_HOST enables tracing. - if trace, err := tracing.NewFromEnv(name); err != nil { + // Do NOT call trace.Close() because of an known issue which could cause the process to block indefinitely + // on shutdown. See: https://github.com/jaegertracing/jaeger-client-go/issues/577 + if _, err := tracing.NewFromEnv(name); err != nil { level.Error(util_log.Logger).Log("msg", "Failed to setup tracing", "err", err.Error()) - } else { - defer trace.Close() } }