Skip to content

Create k8s-log-reviewer.md for logging review process#9037

Open
CatherineF-dev wants to merge 4 commits into
kubernetes:mainfrom
CatherineF-dev:log-reviewer-2
Open

Create k8s-log-reviewer.md for logging review process#9037
CatherineF-dev wants to merge 4 commits into
kubernetes:mainfrom
CatherineF-dev:log-reviewer-2

Conversation

@CatherineF-dev

Copy link
Copy Markdown
Contributor

Add guidelines for SIG-Instrumentation logging review process, including structured and contextual logging standards, review checklist, and testing practices.

Which issue(s) this PR fixes:

Fixes #9036

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: CatherineF-dev
Once this PR has been reviewed and has the lgtm label, please assign dashpole for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/developer-guide Issues or PRs related to the developer guide sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 19, 2026

@pohly pohly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems more targeted towards AI than humans? Just wondering.

Is it possible to do some sanity checking that this is actually producing useful reviews?

`logcheck.conf` (see #133699, #124722, #115669).

### 2. Contextual logging: thread a logger, don't proliferate `WithLogger` variants or break API.
- Prefer adding a `logger`/`ctx` parameter to a *new/unreleased* function rather than a parallel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's typically not possible when converting existing code. Sometimes a new method might be coming anyway, but usually not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated a little.

Comment thread contributors/devel/sig-instrumentation/k8s-log-reviewer.md Outdated
Comment thread contributors/devel/sig-instrumentation/k8s-log-reviewer.md Outdated
Comment thread contributors/devel/sig-instrumentation/k8s-log-reviewer.md Outdated
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: CatherineF-dev
Once this PR has been reviewed and has the lgtm label, please assign dashpole for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@CatherineF-dev

Copy link
Copy Markdown
Contributor Author

Is it possible to do some sanity checking that this is actually producing useful reviews?

Stage1: experimental with manual triggering. Sig-instrumentation reviewers can trigger them manually with draft comments.

Stage2: update the skill during the review.

Stage3: auto-triggering after the skill is mature.

Currently, we are at stage1.

@CatherineF-dev

Copy link
Copy Markdown
Contributor Author

@pohly we plan to discuss it in tmr's sig-instrumentation meeting.

@kubernetes-prow kubernetes-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 26, 2026
CatherineF-dev and others added 2 commits June 29, 2026 20:36
Add guidelines for SIG-Instrumentation logging review process, including structured and contextual logging standards, review checklist, and testing practices.

Update contributors/devel/sig-instrumentation/k8s-log-reviewer.md

Co-authored-by: Patrick Ohly <[email protected]>

Update contributors/devel/sig-instrumentation/k8s-log-reviewer.md

Co-authored-by: Patrick Ohly <[email protected]>

Update contributors/devel/sig-instrumentation/k8s-log-reviewer.md

Co-authored-by: Patrick Ohly <[email protected]>
If none apply, report "not a logging change — out of scope" and stop.

## Step 3 — Review checklist
For each finding cite file:line and tag **BLOCKER** / **NIT** / **QUESTION**.

@pohly pohly Jun 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not a blocker for this PR, just a general observation: people dumping a single AI review back into a top-level comment put the work of correlating the finding back to source code on the maintainer developer. It also doesn't enable per-finding discussion threads in the PR review.

If this becomes more common, we may have to make it clear that such reviews are not desirable.

OTOH, they offload work from the bottleneck (maintainer) to the person who presumably has more time (contributor).

🤷

@CatherineF-dev CatherineF-dev Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  1. AI reviews

As just added here,
Human Review Required: All suggestions, checklists, and reports generated by these agent skills must be reviewed and verified by a human before being posted as comments on any pull request.

  1. top-level comments

Inline comments are possible.

gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \
  -f body="Your comment text here" \
  -f commit_id="<commit_sha>" \
  -f path="path/to/file.ext" \
  -F line=42 \
  -f side="RIGHT"
  1. if a contributor runs an AI review themselves to polish their PR before requesting a maintainer's review

Currently, sig-instrumentation reviewers will choose and post comments after manual review.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can gh api also start a review, i.e. keep the comment pending?

The perfect workflow would be:

  • Let AI do an initial pass, generating pending comments on findings.
  • Maintainer double-checks those pending comments and publishes the review.

@CatherineF-dev CatherineF-dev Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let AI do an initial pass, generating pending comments on findings.
Maintainer double-checks those pending comments and publishes the review.

Yes, that's the workflow we plan to use since github supports draft/pending comments. We want to evaluate its values first. We will update the skill over time to optimize the review flow.

@CatherineF-dev CatherineF-dev Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@pohly
I created a review tool that it loads related review skills based on context and added draft comment. Then I can accept/edit/reject the comment, then these comments will be posted into github. We might switch review tool to another one, but the review skills keep the same.

Screenshot 2026-07-10 at 9 40 20 AM Screenshot 2026-07-10 at 9 56 19 AM

Comment thread contributors/devel/sig-instrumentation/k8s-log-reviewer/SKILL.md Outdated
Comment thread contributors/devel/sig-instrumentation/k8s-log-reviewer/SKILL.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/developer-guide Issues or PRs related to the developer guide cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sig-instrumentation]: standardize telemetry reviews

3 participants