Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • A connector implementation does not have to report all the defined metrics. But if a connector reports a metric of the same semantic defined below, the implementation should follow the convention.
  • The following metric convention is not a complete list. More conventional metric will be added over time.
  • The histogram metrics are usually very expensive. Due to its performance impact, we intentionally excluded them in this FLIP. Please see future work section for more details.

...

Name

Type

Unit

Description

numBytesIn

Counter

Bytes

The total number of input bytes since the source started

numBytesInPerSecond

Meter

Bytes/Sec

The input bytes per second

numRecordsIn

Counter

Records

(Existing operator metric) The total number of input records since the source started

numRecordsInPerSecond

Meter

Records/Sec

(Existing operator metric) The input records per second

numRecordsInErrorsCounterRecordsThe total number of record that failed to consume
currentFetchLatencyGaugems

The latency occurred before Flink fetched the record.

This metric is an instantaneous value recorded for the last processed record.

This metric is provided because latency histogram could be expensive. The instantaneous latency value is usually a good enough indication of the latency.

fetchLatency = FetchTime - EventTime

currentLatencyGaugems

The latency occurred before the record is emitted by the source connector.

This metric is an instantaneous value recorded for the last processed record.

This metric is provided because latency histogram could be expensive. The instantaneous latency value is usually a good enough indication of the latency.

latency = EmitTime - EventTime, where the EmitTime is the time the record leaves the source operator.

idleTime

Gauge

ms

The time in milliseconds that the source has not processed any record.

idleTime = CurrentTime - LastRecordProcessTime

pendingBytesGaugeBytes

The number of bytes that have not been fetched by the source. e.g. the remaining bytes in a file after the file descriptor reading position.

Note that not every source reports this metric, but the metric of the same semantic should be reported with this name and specification if the Source does report.

pendingRecordsGaugeRecords

The number of records that have not been fetched by the source. e.g. the available records after the consumer offset in a Kafka partition.

Note that not every source reports this metric, but the metric of the same semantic should be reported with this name and specification if the Source does report.

Sink Metrics

Name

Type

Unit

Description

numBytesOut

Counter

Bytes

The total number of output bytes since the source started

numBytesOutPerSecond

Meter

Bytes/Sec

The output bytes per second

numRecordsOut

Counter

Records

(Existing operator metric) The total number of output records since the source started

numRecordsOutPerSecond

Meter

Records/Sec

(Existing operator metric) The output records per second

numRecordsOutErrorsCounterRecordThe total number of records failed to send
currentSendTimeGaugems

The time it takes to send the last record.

This metric is an instantaneous value recorded for the last processed record.

...

If the connector has its original metrics, the original metric names should still be kept and reported, even some of the original metrics are exposed with standard metric names. That means the connector will double report such metrics.

Anchor
FutureWork
FutureWork
Future Work

...