diff options
author | 2015-03-01 21:56:38 -0800 | |
---|---|---|
committer | 2015-03-01 21:56:38 -0800 | |
commit | faa8480a399061cef95aef394b2e1977bdef4b4a (patch) | |
tree | d00093c3b13072bcff5f60c1989e9af01fa3691e /src/core/surface/init.c | |
parent | 3ec73cec8f38339af7b430932e92492bac0e27dc (diff) |
Tracer registration.
First: ugh.
Second: allow tracer global variables to be registered and then parsed out of a configuration environment variable.
Expose TSI trace config variable directly to ease this a little.
Diffstat (limited to 'src/core/surface/init.c')
-rw-r--r-- | src/core/surface/init.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/surface/init.c b/src/core/surface/init.c index 2d8f36e9c2..4db66fb66e 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -35,6 +35,10 @@ #include "src/core/iomgr/iomgr.h" #include "src/core/debug/trace.h" #include "src/core/statistics/census_interface.h" +#include "src/core/channel/channel_stack.h" +#include "src/core/surface/init.h" +#include "src/core/surface/surface_trace.h" +#include "src/core/transport/chttp2_transport.h" static gpr_once g_init = GPR_ONCE_INIT; static gpr_mu g_init_mu; @@ -50,7 +54,11 @@ void grpc_init(void) { gpr_mu_lock(&g_init_mu); if (++g_initializations == 1) { - grpc_init_trace_bits(); + grpc_register_tracer("channel", &grpc_trace_channel); + grpc_register_tracer("surface", &grpc_surface_trace); + grpc_register_tracer("http", &grpc_http_trace); + grpc_security_pre_init(); + grpc_tracer_init("GRPC_TRACE"); grpc_iomgr_init(); census_init(); } |