com.google.cloud.bigtable.util
Class TracingUtilities
- java.lang.Object
-
- com.google.cloud.bigtable.util.TracingUtilities
-
public final class TracingUtilities extends Object
These utilities are to be used in conjunction with the opencensus-contrib-zpages artifact to display a consistent set of Cloud Bigtable RPC methods.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:
This is a method of enabling exports to stackdriver along with the opencensus-exporter-trace-stackdriver artifact:int port = ... ; // Choose a port number try { TracingUtilities.setupTracingConfig(); ZPageHandlers.startHttpServerAndRegisterAll(port); } catch (Throwable e) { LOG.error("Could not initialize ZPageHandlers", e); }
try { StackdriverExporter.createAndRegister(projectId); } catch (Throwable e) { LOG.error("Could not register stackdriver", e); }
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static void
setupTracingConfig()
This is a one time setup for grpcz pages.
-
-
-
Method Detail
-
setupTracingConfig
public static void setupTracingConfig()
This is a one time setup for grpcz pages. This adds all of the methods to the Tracing environment required to show a consistent set of methods relating to Cloud Bigtable on the grpcz page. If HBase artifacts are present, this will add tracing metadata for HBase methods.
-
-