diff --git a/src/core/debug/trace.c b/src/core/debug/trace.c index e0b502bb9cc..b53dfe804bb 100644 --- a/src/core/debug/trace.c +++ b/src/core/debug/trace.c @@ -99,6 +99,9 @@ void grpc_tracer_init(const char *env_var) { parse(e); gpr_free(e); } +} + +void grpc_tracer_shutdown(void) { while (tracers) { tracer *t = tracers; tracers = t->next; diff --git a/src/core/debug/trace.h b/src/core/debug/trace.h index c02f14b7f20..fc8615bc693 100644 --- a/src/core/debug/trace.h +++ b/src/core/debug/trace.h @@ -38,5 +38,6 @@ void grpc_register_tracer(const char *name, int *flag); void grpc_tracer_init(const char *env_var_name); +void grpc_tracer_shutdown(void); #endif /* GRPC_INTERNAL_CORE_DEBUG_TRACE_H */ diff --git a/src/core/surface/init.c b/src/core/surface/init.c index ac6871c6f22..ca61a38a351 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -78,6 +78,7 @@ void grpc_shutdown(void) { grpc_iomgr_shutdown(); census_shutdown(); grpc_timers_global_destroy(); + grpc_tracer_shutdown(); } gpr_mu_unlock(&g_init_mu); }