public class MethodMetricGauge extends Object implements MethodMetricsContext
MethodMetrics(which aggregated values over all calls) does not provide information on how each call performed. Having gauge for each call will solve the purpose, which resulted in this class. The gauge added here should be created with unique name for each call so that the gauges are not lost to the latest calls.
|Constructor and Description|
The gauge for method time.
public MethodMetricGauge(@NonNull com.codahale.metrics.MetricRegistry metricRegistry, @NonNull String gaugeName)
metricRegistry- The metric registry
gaugeName- Gauge name. It should be unique for each creation. Callers have to take care of passing unique name
public void markError()
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.