Fix trace unavailable on distributed version (#5072)

Signed-off-by: godchen <qingxiang.chen@zilliz.com>
pull/5080/head
godchen 2021-04-28 11:48:44 +08:00 committed by GitHub
parent 94f0966225
commit 584051b2bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -63,9 +63,11 @@ func (mr *MilvusRoles) EnvValue(env string) bool {
}
func (mr *MilvusRoles) Run(localMsg bool) {
closer := trace.InitTracing("standalone")
if closer != nil {
defer closer.Close()
if os.Getenv("DEPLOY_MODE") == "STANDALONE" {
closer := trace.InitTracing("standalone")
if closer != nil {
defer closer.Close()
}
}
ctx, cancel := context.WithCancel(context.Background())