Instead of storing the information in the file itself, you could store the "meta" information in the filebeat config for the file as a workaround.
The meta data enrichment on the filebeat side could be done through a processor. We already have processors to enrich events with meta information from docker for example.