Package com.google.cloud.datastore
Class TraceUtil
java.lang.Object
com.google.cloud.datastore.TraceUtil
Helper class for tracing utility. It is used for instrumenting
HttpDatastoreRpc with
OpenCensus APIs.
TraceUtil instances are created by the getInstance() method.
-
Method Summary
Modifier and TypeMethodDescriptionstatic TraceUtilReturn TraceUtil Object.io.opencensus.trace.TracerReturn the globalTracer.protected io.opencensus.trace.SpanStarts a new span.
-
Method Details
-
startSpan
Starts a new span.- Parameters:
spanName- The name of the returned Span.- Returns:
- The newly created
Span.
-
getTracer
public io.opencensus.trace.Tracer getTracer()Return the globalTracer.- Returns:
- The global
Tracer.
-
getInstance
Return TraceUtil Object.- Returns:
- An instance of
TraceUtil
-