Class DisabledTraceUtil

java.lang.Object
com.google.cloud.firestore.telemetry.DisabledTraceUtil
All Implemented Interfaces:
TraceUtil

public class DisabledTraceUtil extends Object implements TraceUtil
A fully disabled (No-op) tracing utility class that does not perform any tracing actions and has near-zero overhead.
  • 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: TraceUtil
      Returns a channel configurator for gRPC, or null if tracing is disabled.
      Specified by:
      getChannelConfigurator in interface TraceUtil
    • startSpan

      public com.google.cloud.firestore.telemetry.DisabledTraceUtil.Span startSpan(String spanName)
      Description copied from interface: TraceUtil
      Starts a new span with the given name, sets it as the current span, and returns it.
      Specified by:
      startSpan in interface TraceUtil
    • startSpan

      public TraceUtil.Span startSpan(String spanName, TraceUtil.Context parent)
      Description copied from interface: TraceUtil
      Starts a new span with the given name and the given context as its parent, sets it as the current span, and returns it.
      Specified by:
      startSpan in interface TraceUtil
    • currentSpan

      @Nonnull public TraceUtil.Span currentSpan()
      Description copied from interface: TraceUtil
      Returns the current span.
      Specified by:
      currentSpan in interface TraceUtil
    • currentContext

      @Nonnull public TraceUtil.Context currentContext()
      Description copied from interface: TraceUtil
      Returns the current Context.
      Specified by:
      currentContext in interface TraceUtil