-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Discussion: Conventions for log keys #9447
Copy link
Copy link
Closed
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
This issue is to discuss conventions for log keys (brought up in kubernetes-sigs/cluster-api-provider-vsphere#2352 (comment)).
Current state in Cluster API:
Machine,Cluster,MachineDeployment.count,revision,timeout, ...In my opinion in a lot of cases for 2. we should ask ourselves if these even should be k/v pairs. For me it doesn't make sense to just put all data in a k/v pair. We should always think about if the k/v pair is actually useful. E.g. does it make sense to filter logs based on a
timeoutor on acountor does it make the log more readable. In my opinion this sort of data should be simply part of the message. But maybe I'm missing something.Independent of that. For kinds we have to use the
kinddirectly as we don't always know the kind upfront and then there is no good way to automatically calculate the right lowerCamelCase format of it. Please also see this PR in controller-runtime: kubernetes-sigs/controller-runtime#1954Now the question becomes, do we want to use CamelCase for all log keys consistently or only for kinds?
As far as I'm aware there is no upstream guidance on it: