Interface MetricsUtil.MetricsContext

Enclosing interface:
MetricsUtil

public static interface MetricsUtil.MetricsContext
A context for recording metrics in the Firestore SDK.
  • Method Details

    • recordLatencyAtFuture

      <T> void recordLatencyAtFuture(TelemetryConstants.MetricType metric, com.google.api.core.ApiFuture<T> futureValue)
      If the operation ends in the future, its relevant metrics should be recorded _after_ the future has been completed. This method "appends" the metrics recording code at the completion of the given future.
    • recordLatency

      void recordLatency(TelemetryConstants.MetricType metric)
      Records specific type of latency for the current operation.
    • recordLatency

      void recordLatency(TelemetryConstants.MetricType metric, Throwable t)
      Records specific type of latency for the current operation, which ended with a throwable.
    • recordCounterAtFuture

      <T> void recordCounterAtFuture(TelemetryConstants.MetricType metric, com.google.api.core.ApiFuture<T> futureValue)
      Records the counter value for a metric type _after_ the future has been completed. This method "appends" the metrics recording code at the completion of the given future.
    • incrementCounter

      void incrementCounter()
      Increments the counter tracked inside the MetricsContext.