Interface MetricsUtil.MetricsContext
- Enclosing interface:
- MetricsUtil
public static interface MetricsUtil.MetricsContext
A context for recording metrics in the Firestore SDK.
-
Method Summary
Modifier and TypeMethodDescriptionvoidIncrements the counter tracked inside the MetricsContext.<T> voidrecordCounterAtFuture(TelemetryConstants.MetricType metric, com.google.api.core.ApiFuture<T> futureValue) Records the counter value for a metric type _after_ the future has been completed.voidRecords specific type of latency for the current operation.voidrecordLatency(TelemetryConstants.MetricType metric, Throwable t) Records specific type of latency for the current operation, which ended with a throwable.<T> voidrecordLatencyAtFuture(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.
-
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
Records specific type of latency for the current operation. -
recordLatency
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.
-