@PublicEvolving public interface SinkWriterMetricGroup extends OperatorMetricGroup
You should only update the metrics in the main operator thread.
Modifier and Type | Method and Description |
---|---|
Counter |
getNumBytesSendCounter()
The total number of output send bytes since the task started.
|
Counter |
getNumRecordsOutErrorsCounter()
The total number of records failed to send.
|
Counter |
getNumRecordsSendCounter()
The total number of records have been sent to the downstream system.
|
Counter |
getNumRecordsSendErrorsCounter()
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, addSpan, counter, counter, counter, counter, gauge, gauge, getAllVariables, getMetricIdentifier, getMetricIdentifier, getScopeComponents, histogram, histogram, meter, meter
Counter getNumRecordsOutErrorsCounter()
Counter getNumRecordsSendErrorsCounter()
This metric has the same value as numRecordsOutError
.
Counter getNumRecordsSendCounter()
Note: this counter will count all records the SinkWriter sent. From SinkWirter's
perspective, these records have been sent to the downstream system, but the downstream system
may have issue to perform the persistence action within its scope. Therefore, this count may
include the number of records that are failed to write by the downstream system, which should
be counted by getNumRecordsSendErrorsCounter()
.
This metric has the same value as numRecordsOut
of the operator.
Counter getNumBytesSendCounter()
This metric has the same value as numBytesOut
of the operator
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–2024 The Apache Software Foundation. All rights reserved.