You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently filelog supports consume compressed files(gzip only at this moment), if there is no compression set in receiver config, and file pattern happens to match compressed files, it treats them as "plain" text and sends out the compressed content. Would it make sense to detect file type(mimetype) and automatically(or configurable) to stop processing files if they are not plain text?
Describe the solution you'd like
detect file mimetype and exclude compressed files
Describe alternatives you've considered
No response
Additional context
2024-09-27T10:15:27.643+0800 info fileconsumer/file.go:256 Started watching file {"kind": "receiver", "name": "filelog", "data_type": "logs", "component": "fileconsumer", "path": "/tmp/logs/1.log.gz"}
...
Body: Str(�f1.log�W�n�6��+]����ӻA'h`���5%�$��;��ʘ6T"u4�;��&���iw0�����N)�\��ݏ7�с�T�W�)
The text was updated successfully, but these errors were encountered:
This seems like it would add some overhead just to always check for an edge case. Can the user just instead exclude files which end with extensions like .gzip?
Component(s)
receiver/filelog
Is your feature request related to a problem? Please describe.
Currently filelog supports consume compressed files(gzip only at this moment), if there is no compression set in receiver config, and file pattern happens to match compressed files, it treats them as "plain" text and sends out the compressed content. Would it make sense to detect file type(mimetype) and automatically(or configurable) to stop processing files if they are not plain text?
Describe the solution you'd like
detect file mimetype and exclude compressed files
Describe alternatives you've considered
No response
Additional context
The text was updated successfully, but these errors were encountered: