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

Standardize the application-related log structured fields #20731

Open
andrii-korotkov-verkada opened this issue Nov 9, 2024 · 1 comment
Open
Assignees
Labels
component:logging enhancement New feature or request good first issue Good for newcomers

Comments

@andrii-korotkov-verkada
Copy link
Contributor

Summary

In some places like application controller file there's a standardization to specify application structured field value without a namespace, while also adding namespace as a separate field + a couple more fields

func getAppLog(app *appv1.Application) *log.Entry {
return log.WithFields(log.Fields{
"application": app.Name,
"app-namespace": app.Namespace,
"app-qualified-name": app.QualifiedName(),
"project": app.Spec.Project,
})
}
. However, it's not like that in all files, and some files still log the application field with prepended namespace and /. It'd be great to standardize this across the codebase.

Motivation

Easier and more consistent log analysis experience.

Proposal

Audit places which log or should application field, move the helper function to the common utils and use it in those places.

@d-cryptic
Copy link

Hi, I want to contribute on this issue. Can you assign this to me please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:logging enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants