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
logging: use kind-prefixed fields instead of string-formatting #1705
logging: use kind-prefixed fields instead of string-formatting #1705
Conversation
e333ebb
to
09a10de
Compare
@@ -40,6 +40,8 @@ const ( | |||
NamespaceKey = "namespace" | |||
// NameKey is used to specify a name when a log is related to an object. | |||
NameKey = "name" | |||
// APIVersionKey is used to specify an API version when a log is related to an object. | |||
APIVersionKey = "apiVersion" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should find short keys for the common ones. ws
, ns
, v
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally disagree ;)
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
09a10de
to
0371b5b
Compare
@sttts updated - re: short-names ... any UI (even the CLI ones) for filtering structured logs do autocomplete for you, and I prefer the readability and explicitness of longer names, for variables, flags, etc. If we find ourselves manually typing something a lot I'd investigate why, then maybe fix that, then look into shorter names. We furthermore have the ability to map names to shorter things if we're developing a viewing layer on top anyway. |
Let's merge and learn whether this is what we want. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
wow. unit test flake /retest |
Signed-off-by: Steve Kuznetsov skuznets@redhat.com
Part of #1694
/assign @sttts
Using the resource instead of the kind would be cool but I don't know that there's any lightweight way to figure that out.