Class TraceUtil (2.18.5)

publicclass 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()

publicstaticTraceUtilgetInstance()

Return TraceUtil Object.

Returns
Type Description
TraceUtil

An instance of TraceUtil

Methods

getTracer()

publicTracergetTracer()

Return the global Tracer.

Returns
Type Description
io.opencensus.trace.Tracer

The global Tracer.

startSpan(String spanName)

protectedSpanstartSpan(StringspanName)

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.