Skip to content
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

Use production mode for logging #651

Open
idlewis opened this issue Nov 13, 2024 · 0 comments
Open

Use production mode for logging #651

idlewis opened this issue Nov 13, 2024 · 0 comments

Comments

@idlewis
Copy link
Member

idlewis commented Nov 13, 2024

The operator configures the underlying zap logger with the 'development' config in main.go
https://github.com/application-stacks/runtime-component-operator/blob/e22638ec73c928fb27809f044916b14f26ea269f/cmd/main.go#L81

We should consider switching to the production config
https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/log/zap#UseDevMode

This would

  • switch to JSON logs (for easier processing)
  • reduce the number of stack traces logged
  • enable log sampling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant