-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] [parser /container] Error with Reduced max_log_size in OpenTelemetry Collector's Filelog Receiver #36020
Comments
Pinging code owners:
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 I assume that when the |
@ChrsMark , bellow the log line , thx |
Thank's @Masmiiadm! One more question: what container runtime your k8s cluster runs with? Actually what we need to check here is what is stored in the log file at I think that for cri (containerd and cri-o) formats even with |
Hi @ChrsMark , the log format is containerd , |
Ok, I was able to reproduce this by setting What happens here is that the log line is split based on the In that case the failure makes sense. Not sure what the container parser could do differently here. Maybe we could just introduce a setting to ignore such failures in case they are coming from chunked log lines? |
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
The text was updated successfully, but these errors were encountered: