external-health-monitor icon indicating copy to clipboard operation
external-health-monitor copied to clipboard

Support contextual logging

Open bells17 opened this issue 1 year ago • 7 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

I've updated the klog functions used within csi-lib-utils to contextual logging functions, following the guidelines below: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md

In a previous PR below, I addressed structured logging, but I realized that I only handled structured logging and did not address contextual logging. https://github.com/kubernetes-csi/external-health-monitor/pull/208

Therefore, in this PR, I have addressed contextual logging.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

  • Added contextual logging checks using logcheck. (You can run logcheck with make test or make logcheck)
  • Removed unused functions and arguments.

Does this PR introduce a user-facing change?:

Added support for contextual logging.

bells17 avatar May 03 '24 13:05 bells17

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

k8s-ci-robot avatar May 03 '24 13:05 k8s-ci-robot

/wg structured-logging /area logging /priority important-longterm /kind cleanup /cc @kubernetes/wg-structured-logging-reviews

https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#what-to-include-in-the-pull-request

bells17 avatar May 03 '24 14:05 bells17

@bells17: GitHub didn't allow me to request PR reviews from the following users: kubernetes/wg-structured-logging-reviews.

Note that only kubernetes-csi members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/wg structured-logging /area logging /priority important-longterm /kind cleanup /cc @kubernetes/wg-structured-logging-reviews

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar May 03 '24 14:05 k8s-ci-robot

@bells17: The label(s) area/logging cannot be applied, because the repository doesn't have them.

In response to this:

/wg structured-logging /area logging /priority important-longterm /kind cleanup /cc @kubernetes/wg-structured-logging-reviews

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar May 03 '24 14:05 k8s-ci-robot

/cc @pohly (I did cc because @pohly is the only member of @kubernetes/wg-structured-logging-reviews within kubernetes-csi org.)

bells17 avatar May 03 '24 15:05 bells17

/hold

https://kubernetes.slack.com/archives/C09QZFCE5/p1715087356356999

bells17 avatar May 07 '24 15:05 bells17

/hold cancel logcheck crash was fixed.

bells17 avatar May 14 '24 08:05 bells17

/lgtm /approve

jsafrane avatar May 14 '24 10:05 jsafrane

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bells17, jsafrane

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar May 14 '24 10:05 k8s-ci-robot