LongGauge Interface
public interface LongGauge
A counter instrument that records long values.
Counters only allow adding positive values, and guarantee the resulting metrics will be always-increasing monotonic sums.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| abstract boolean |
isEnabled()
Flag indicating if metric implementation is detected and functional, use it to minimize performance impact associated with metrics, e. |
|
abstract
Auto |
registerCallback(Supplier<Long> valueSupplier, TelemetryAttributes attributes)
Registers callbacks to obtain measurements. |
Method Details
isEnabled
public abstract boolean isEnabled()
Flag indicating if metric implementation is detected and functional, use it to minimize performance impact associated with metrics, e.g. measuring latency.
Returns:
true if enabled, false otherwiseregisterCallback
public abstract AutoCloseable registerCallback(Supplier<Long> valueSupplier, TelemetryAttributes attributes)
Registers callbacks to obtain measurements. Make sure to close result to stop reporting metric.
Parameters:
Returns: