receiver/kafka/kafka.go
func (rcv *Kafka) Stat(send helper.StatCallback) {
	metricsReceived := atomic.LoadUint64(&rcv.metricsReceived)
	send("metricsReceived", float64(metricsReceived))

	errors := atomic.LoadUint64(&rcv.errors)
	send("errors", float64(errors))

	if !rcv.statsAsCounters {
		atomic.AddUint64(&rcv.metricsReceived, -metricsReceived)
		atomic.AddUint64(&rcv.errors, -errors)
	}
}
func (rcv *Kafka) Stat(send helper.StatCallback) {
	metricsReceived := atomic.LoadUint64(&rcv.metricsReceived)
	send("metricsReceived", float64(metricsReceived))

	errors := atomic.LoadUint64(&rcv.errors)
	send("errors", float64(errors))

	if !rcv.statsAsCounters {
		atomic.AddUint64(&rcv.metricsReceived, -metricsReceived)
		atomic.AddUint64(&rcv.errors, -errors)
	}
}
// Stat sends kafka receiver's internal stats to specified callback