Class TraceUtil (2.18.5)

public class TraceUtil

Helper class for tracing utility. It is used for instrumenting HttpDatastoreRpc with OpenCensus APIs.

TraceUtil instances are created by the TraceUtil#getInstance() method.

Inheritance

java.lang.Object > TraceUtil

Static Methods

getInstance()

public static TraceUtil getInstance()

Return TraceUtil Object.

Returns
TypeDescription
TraceUtil

An instance of TraceUtil

Methods

getTracer()

public Tracer getTracer()

Return the global Tracer.

Returns
TypeDescription
io.opencensus.trace.Tracer

The global Tracer.

startSpan(String spanName)

protected Span startSpan(String spanName)

Starts a new span.

Parameter
NameDescription
spanNameString

The name of the returned Span.

Returns
TypeDescription
io.opencensus.trace.Span

The newly created Span.