Filebeat overwrites log file source field

you might want to use the json filter instead of codec. Have mutate filter renaming source to logfile before applying the json filter.