Class DisabledTraceUtil (3.27.2)

public class DisabledTraceUtil implements TraceUtil

A fully disabled (No-op) tracing utility class that does not perform any tracing actions and has near-zero overhead.

Inheritance

java.lang.Object > DisabledTraceUtil

Implements

TraceUtil

Constructors

DisabledTraceUtil()

public DisabledTraceUtil()

Methods

currentContext()

public TraceUtil.Context currentContext()

Returns the current Context.

Returns
Type Description
TraceUtil.Context

currentSpan()

public TraceUtil.Span currentSpan()

Returns the current span.

Returns
Type Description
TraceUtil.Span

getChannelConfigurator()

public ApiFunction<ManagedChannelBuilder,ManagedChannelBuilder> getChannelConfigurator()

Returns a channel configurator for gRPC, or null if tracing is disabled.

Returns
Type Description
ApiFunction<io.grpc.ManagedChannelBuilder,io.grpc.ManagedChannelBuilder>

startSpan(String spanName)

public DisabledTraceUtil.Span startSpan(String spanName)

Starts a new span with the given name, sets it as the current span, and returns it.

Parameter
Name Description
spanName String
Returns
Type Description
com.google.cloud.firestore.telemetry.DisabledTraceUtil.Span

startSpan(String spanName, TraceUtil.Context parent)

public TraceUtil.Span startSpan(String spanName, TraceUtil.Context parent)

Starts a new span with the given name and the given context as its parent, sets it as the current span, and returns it.

Parameters
Name Description
spanName String
parent TraceUtil.Context
Returns
Type Description
TraceUtil.Span