Interface SinkWriterMetricGroup

    • Method Detail

      • getNumRecordsOutErrorsCounter

        Counter getNumRecordsOutErrorsCounter()
        The total number of records failed to send.
      • getNumRecordsSendErrorsCounter

        Counter getNumRecordsSendErrorsCounter()
        The total number of records failed to send.

        This metric has the same value as numRecordsOutError.

      • getNumRecordsSendCounter

        Counter getNumRecordsSendCounter()
        The total number of records have been sent to the downstream system.

        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.

      • getNumBytesSendCounter

        Counter getNumBytesSendCounter()
        The total number of output send bytes since the task started.

        This metric has the same value as numBytesOut of the operator

      • setCurrentSendTimeGauge

        void setCurrentSendTimeGauge​(Gauge<Long> currentSendTimeGauge)
        Sets an optional gauge for the time it takes to send the last record.

        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.