Package com.google.cloud.datastore
Class TraceUtil
- java.lang.Object
-
- com.google.cloud.datastore.TraceUtil
-
public class TraceUtil extends Object
Helper class for tracing utility. It is used for instrumentingHttpDatastoreRpc
with OpenCensus APIs.TraceUtil instances are created by the
getInstance()
method.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TraceUtil
getInstance()
Return TraceUtil Object.io.opencensus.trace.Tracer
getTracer()
Return the globalTracer
.protected io.opencensus.trace.Span
startSpan(String spanName)
Starts a new span.
-
-
-
Method Detail
-
startSpan
protected io.opencensus.trace.Span startSpan(String spanName)
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
.
-
-