Class DisabledTraceUtil (3.30.0)

public class DisabledTraceUtil implements TraceUtil

A no-op implementation of MetricsUtil that does not collect or export any metrics 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