public final class TracingUtilities extends Object
NOTE: if you are using HBase, use HBaseTracingUtilities instead of TracingUtilities.
After including the artifact, the following code can be used for enabling grpcz pages:
int port = ... ; // Choose a port number try { TracingUtilities.setupTracingConfig(); ZPageHandlers.startHttpServerAndRegisterAll(port); } catch (Throwable e) { LOG.error("Could not initialize ZPageHandlers", e); }This is a method of enabling exports to stackdriver along with the opencensus-exporter-trace-stackdriver artifact:
try { StackdriverExporter.createAndRegister(projectId); } catch (Throwable e) { LOG.error("Could not register stackdriver", e); }
Modifier and Type | Method and Description |
---|---|
static void |
setupTracingConfig()
This is a one time setup for grpcz pages.
|
public static void setupTracingConfig()