Autoscaler: Toggle JSON formatting for logs

Created on 15 Dec 2019  路  12Comments  路  Source: kubernetes/autoscaler

It'd be great if we had a way to enable json logging format.

Most helpful comment

To give some context on this, structured logging is very popular and useful. It allows users to group and search logs across services. The most common structured logging format is currently JSON. There are lots of resources that talk about the usefulness of structured logging, such as this one. It's understandable by most third party SaaS platforms as well, such as datadog or gcp

All 12 comments

Hello, we would love to have that feature ! We are using Datadog and right now there is no way to differentiate as far as i'm aware between debug, warning error logs etc...

To give some context on this, structured logging is very popular and useful. It allows users to group and search logs across services. The most common structured logging format is currently JSON. There are lots of resources that talk about the usefulness of structured logging, such as this one. It's understandable by most third party SaaS platforms as well, such as datadog or gcp

Oh yes please! we just found out that all of cluster-autoscaler logs are displayed in datadog as ERROR logs, whey they are in fact INFO. +1 to this feature.
Maybe adding an Env var to the deployment for switching the output into json format?

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

https://github.com/sirupsen/logrus has example of JSON logging in README

Looks like cluster-autoscaler has custom logger implementation tho https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/clusterstate/utils/logging.go

Is there any update about this?

I don't believe anyone is working on this. Cluster Autoscaler uses klog for logging and we've recently moved on to klog v2, which has support for structured logging. However, updating all logging in CA would be a large task and so far no one has stepped up to take it.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

Hi, any update on why this was closed?

Hi, any update on why this was closed?

I went ahead and opened this issue on Dec 14, 2019 -- I just went through and cleaned up my open issues.

Based on this comment: https://github.com/kubernetes/autoscaler/issues/2646#issuecomment-702014967 I don't think this will get picked up anytime soon.

Was this page helpful?
0 / 5 - 0 ratings