-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
inconsistent log output format #5715
Comments
The inconsistent log output is causing issues with our EFK stack. When trying to parse the log messages as logfmt, the intermittent go messages confuse fluentbit. It detects various words in the go message as their own new fields, causing an explosion in the corresponding Elasticsearch index mapping.
I generally see go messages when the control plane is down, so temporarily taking down the control plane might be a way to generate them. Setting the log format to JSON does not affect the go messages, and therefore can't be used to solve the issue. |
I had to rewrite this from scratch off-company-time, so I haven't tested to see if it works, but here's a workaround to parse and regex if you're writing your own stream processors in Go: https://gist.github.com/crdrost/ce08b2449d438a2c3b18fe64cad39095 I agree though that the stderr output should ideally dump as level=ERROR messages in logfmt. |
Implementors might also be interested in this tidbit I saw while looking into the problem, this injects Logrus as a gRPC v2 logger which I think would fix the "Failed to obtain reader, failed to marshal fields to JSON" error? Obviously the
and, presumably with breaking a Terminal connection because that's where websockets are used,
note that this is also a weird log duplicate as far as I can tell? |
Checklist:
argocd version
.Describe the bug
k8s.io/client-go
outputs logs throughk8s.io/klog{,/v2}
which is a different format (glog style) thanargocd
(logfmt or json), making it annoying to parse, example belowSomething else outputs plaintext
To Reproduce
Not sure how to reliably generate errors in client-go
Expected behavior
logs output in consistent structured format
Version
Logs
From
argocd-application-controller
From
argocd-server
The text was updated successfully, but these errors were encountered: