This is painful to get logging (Grok parsing) setup --in Datadog at least... for me.
It seems that when you use opts.BindFlags, the controller-runtime/zap default of RFC3339TimeEncoder will be changed to epoch. 🤦
Personally, I don't need epoch in cluster. I suppose it might be more useful in local development, so the flag --zap-time-encoding=epoch could be passed to manager.
One could also (even myself) use a Kustomize patch to pass the flag into manager.
Existing:
1.687317215031635e+09 INFO controller-runtime.metrics Metrics server is starting to listen {"addr": ":8080"}
1.687317215032804e+09 INFO setup starting manager
1.687317215033797e+09 INFO Starting server {"path": "/metrics", "kind": "metrics", "addr": "[::]:8080"}
1.687317215033952e+09 INFO Starting server {"kind": "health probe", "addr": "[::]:8081"}
Proposed:
2023-06-20T22:14:02-05:00 INFO controller-runtime.metrics Metrics server is starting to listen {"addr": ":8080"}
2023-06-20T22:14:02-05:00 INFO setup starting manager
2023-06-20T22:14:02-05:00 INFO Starting server {"path": "/metrics", "kind": "metrics", "addr": "[::]:8080"}
2023-06-20T22:14:02-05:00 INFO Starting server {"kind": "health probe", "addr": "[::]:8081"}
This is painful to get logging (Grok parsing) setup --in Datadog at least... for me.
It seems that when you use opts.BindFlags, the controller-runtime/zap default of
RFC3339TimeEncoder
will be changed toepoch
. 🤦Personally, I don't need epoch in cluster. I suppose it might be more useful in local development, so the flag
--zap-time-encoding=epoch
could be passed to manager.One could also (even myself) use a Kustomize patch to pass the flag into manager.
Existing:
Proposed:
PR incoming.
Thanks!