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

Support contextual logging #259

Merged
merged 2 commits into from
May 14, 2024

Conversation

bells17
Copy link
Contributor

@bells17 bells17 commented May 3, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

I've updated the klog functions used within livenessprobe 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.
#202

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)

Does this PR introduce a user-facing change?:

Added support for contextual logging.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 3, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 3, 2024
@bells17
Copy link
Contributor Author

bells17 commented May 3, 2024

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

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

@k8s-ci-robot k8s-ci-robot requested a review from pohly May 3, 2024 18:19
@k8s-ci-robot k8s-ci-robot added wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels May 3, 2024
@bells17 bells17 force-pushed the contextual-logging branch 2 times, most recently from 1884439 to 759efd4 Compare May 4, 2024 06:42
@bells17
Copy link
Contributor Author

bells17 commented May 7, 2024

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 7, 2024
hack/verify-logcheck.sh Outdated Show resolved Hide resolved
@bells17 bells17 changed the title Support structured logging Support contextual logging May 11, 2024
Makefile Outdated
Comment on lines 20 to 24
# Check contextual logging.
.PHONY: logcheck
test: logcheck
logcheck:
hack/verify-logcheck.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the one from release-tools

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsafrane Thank you. I changed to use test-logcheck.

@jsafrane
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 13, 2024
@k8s-ci-robot
Copy link
Contributor

[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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2024
@jsafrane
Copy link
Contributor

/hold cancel
logcheck crash was fixed.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 14, 2024
@k8s-ci-robot k8s-ci-robot merged commit f3b0982 into kubernetes-csi:master May 14, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants