Open Masmiiadm opened 3 days ago
Pinging code owners:
pkg/stanza: @djaglowski
See Adding Labels via Comments if you do not have permissions to add labels yourself.
cc @ChrsMark
Hey @Masmiiadm, could you share a sample log line that causes that failure? From what I can see in the Log Output
section of the issue, the entry does not really look like a valid format? Or what I see is the trimmed log line?
I assume that when the max_log_size
is set the log lines can be trimmed. In that case the container format might have been corrupted and seeing the parser failing actually makes sense.
Component(s)
pkg/stanza
What happened?
Description
I based the new log parsing setup for the OpenTelemetry Collector on this documentation, and everything worked perfectly with the default configuration.
However, when I tried reducing the max_log_size parameter in the filelogreceiver configuration from its default value of 1 MiB to 40 KiB, I encountered the following error
"data_type": "logs", "component": "fileconsumer", "path": "/var/log/pods/kiali-operator_kiali-kiali-operator-5f5f969b89-7vqcx_bd93551f-ff0e-413e-95b1-4fd8420f2690/operator/0.log", "error": "failed to detect a valid container log format: entry cannot be parsed as container logs" "deployment\": {\".\": {}, \"f:instanceName\": {}, \"f:namespace\": {}}, \"f:environment\": {\".\": {}, \"f:isKubernetes\": {}}, \"f....
Expected Result
the fileconsumer parses these logs successfully like the 1MiB default configuration
Actual Result
the filelog receiver and th container parser failed to detect a valid container log format when configure max_log_size 40 KiB
Collector version
0.111.0
Environment information
No response
OpenTelemetry Collector configuration
Log output
Additional context
No response