public interface SinkWriterMetricGroup extends OperatorMetricGroup
You should only update the metrics in the main operator thread.
Modifier and Type | Method and Description |
---|---|
Counter |
getNumRecordsOutErrorsCounter()
The total number of records failed to send.
|
void |
setCurrentSendTimeGauge(Gauge<Long> currentSendTimeGauge)
Sets an optional gauge for the time it takes to send the last record.
|
getIOMetricGroup
addGroup, addGroup, addGroup, counter, counter, counter, counter, gauge, gauge, getAllVariables, getMetricIdentifier, getMetricIdentifier, getScopeComponents, histogram, histogram, meter, meter
Counter getNumRecordsOutErrorsCounter()
void setCurrentSendTimeGauge(Gauge<Long> currentSendTimeGauge)
This metric is an instantaneous value recorded for the last processed record.
If this metric is eagerly calculated, this metric should NOT be updated for each record. Instead, update this metric for each batch of record or sample every X records.
Note for asynchronous sinks, the time must be accessible from the main operator thread. For example, a `volatile` field could be set in the async thread and lazily read in the gauge.
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.