Class TraceUtil (2.20.0)

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
Type Description
TraceUtil

An instance of TraceUtil

Methods

getTracer()

public Tracer getTracer()

Return the global Tracer.

Returns
Type Description
io.opencensus.trace.Tracer

The global Tracer.

startSpan(String spanName)

protected Span startSpan(String spanName)

Starts a new span.

Parameter
Name Description
spanName String

The name of the returned Span.

Returns
Type Description
io.opencensus.trace.Span

The newly created Span.