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 TraceUtil
Return TraceUtil Object.io.opencensus.trace.Tracer
Return the globalTracer
.protected io.opencensus.trace.Span
Starts 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
-