private void strictRecord(Sensor sensor, double value, long timeMs) {
        synchronized (sensor) {
            sensor.checkQuotas(timeMs);
            sensor.record(value, timeMs, false);
        }
    }
The Sensor#checkQuotas should be thread-safe since the method may be used by many ReplicaFetcherThreads.
clients/src/test/java/org/apache/kafka/common/metrics/SensorTest.java