Class DisabledTraceUtil
java.lang.Object
com.google.cloud.firestore.telemetry.DisabledTraceUtil
- All Implemented Interfaces:
TraceUtil
A no-op implementation of
MetricsUtil that does not collect or export any metrics and has
near-zero overhead.-
Field Summary
Fields inherited from interface com.google.cloud.firestore.telemetry.TraceUtil
ATTRIBUTE_KEY_ATTEMPT, ATTRIBUTE_KEY_ATTEMPTS_ALLOWED, ATTRIBUTE_KEY_ATTEMPTS_REMAINING, ATTRIBUTE_KEY_DOC_COUNT, ATTRIBUTE_KEY_IS_RETRY_WITH_CURSOR, ATTRIBUTE_KEY_IS_TRANSACTIONAL, ATTRIBUTE_KEY_NUM_RESPONSES, ATTRIBUTE_KEY_TRANSACTION_TYPE, ATTRIBUTE_SERVICE_PREFIX, ENABLE_TRACING_ENV_VAR, LIBRARY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the current Context.Returns the current span.com.google.api.core.ApiFunction<io.grpc.ManagedChannelBuilder,io.grpc.ManagedChannelBuilder> Returns a channel configurator for gRPC, ornullif tracing is disabled.com.google.cloud.firestore.telemetry.DisabledTraceUtil.SpanStarts a new span with the given name, sets it as the current span, and returns it.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.
-
Constructor Details
-
DisabledTraceUtil
public DisabledTraceUtil()
-
-
Method Details
-
getChannelConfigurator
@Nullable public com.google.api.core.ApiFunction<io.grpc.ManagedChannelBuilder,io.grpc.ManagedChannelBuilder> getChannelConfigurator()Description copied from interface:TraceUtilReturns a channel configurator for gRPC, ornullif tracing is disabled.- Specified by:
getChannelConfiguratorin interfaceTraceUtil
-
startSpan
Description copied from interface:TraceUtilStarts a new span with the given name, sets it as the current span, and returns it. -
startSpan
Description copied from interface:TraceUtilStarts a new span with the given name and the given context as its parent, sets it as the current span, and returns it. -
currentSpan
Description copied from interface:TraceUtilReturns the current span.- Specified by:
currentSpanin interfaceTraceUtil
-
currentContext
Description copied from interface:TraceUtilReturns the current Context.- Specified by:
currentContextin interfaceTraceUtil
-