public boolean shouldRecord() {
        return this.recordingLevel.shouldRecord(config.recordLevel().id);
    }
@return true if the sensor's record level indicates that the metric will be recorded, false otherwise
clients/src/main/java/org/apache/kafka/common/metrics/Sensor.java