Class TraceUtil


  • public class TraceUtil
    extends Object
    Helper class for tracing utility. It is used for instrumenting HttpDatastoreRpc with OpenCensus APIs.

    TraceUtil instances are created by the getInstance() method.

    • 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 global Tracer.
        Returns:
        The global Tracer.
      • getInstance

        public static TraceUtil getInstance()
        Return TraceUtil Object.
        Returns:
        An instance of TraceUtil