datadog-operator icon indicating copy to clipboard operation
datadog-operator copied to clipboard

INFO type logging to stderr ; should be stdout

Open TiloGit opened this issue 1 year ago • 2 comments

Hi,

seems that the operator emits INFO messages to stderr. stdout seems to be the appropriate place for that.

example:

LogSource:  stderr
{"level":"INFO","ts":"2025-01-02T18:17:11.5370000Z","logger":"controllers.DatadogAgent","msg":"Reconciling DatadogAgent","datadogagent":{"name":"datadog","namespace":"default"}}

Here overview (Azure Insights) Image

Version:

    Image:         datadoghq.azurecr.io/operator:1.11.1
    Image ID:      datadoghq.azurecr.io/operator@sha256:af8bf62c8819e15255349787c9c293d4522231d32ef72a460c4a2f66c212a3e1

TiloGit avatar Jan 02 '25 18:01 TiloGit

I think this is coming from the logger defaults in controller runtime: https://github.com/kubernetes-sigs/controller-runtime/blob/1ac370e560b19321af779df0610622c03106ec77/pkg/log/zap/zap.go#L148-L150

I'll add a feature request for this for our backlog

khewonc avatar Jan 03 '25 16:01 khewonc

see here maybe: https://github.com/kubernetes-sigs/controller-runtime/issues/2242

TiloGit avatar Jan 06 '25 21:01 TiloGit

This issue has been automatically marked as stale because it has not had activity in the past 15 days.

It will be closed in 30 days if no further activity occurs. If this issue is still relevant, adding a comment will keep it open. Also, you can always reopen the issue if you missed the window.

Thank you for your contributions!

dd-octo-sts[bot] avatar Oct 14 '25 10:10 dd-octo-sts[bot]