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

contextual logging #3077

Open
4 tasks done
pohly opened this issue Dec 6, 2021 · 17 comments
Open
4 tasks done

contextual logging #3077

pohly opened this issue Dec 6, 2021 · 17 comments
Assignees
Labels
sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. stage/alpha Denotes an issue tracking an enhancement targeted for Alpha status tracked/no Denotes an enhancement issue is NOT actively being tracked by the Release Team wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging.

Comments

@pohly
Copy link
Contributor

pohly commented Dec 6, 2021

Enhancement Description


Current configuration

https://github.com/kubernetes/kubernetes/blob/master/hack/logcheck.conf

Current status (line counts from 2022-10-27)

The following table counts log calls that need to be converted. The numbers for contextual logging include those for structured logging.

At this point, controllers could get converted to contextual logging or one of the components that was already converted to structured logging. If you want to pick one, ping @pohly on the #wg-structured-logging Slack channel. See structured and contextual logging migration instructions for guidance.

Component Non-Structured Logging Non-Contextual Logging Owner
pkg/controller/bootstrap 15 28 @mengjiao-liu, kubernetes/kubernetes#113464
pkg/controller/certificates 22 31 @mengjiao-liu
pkg/controller/clusterroleaggregation 2 2 @mengjiao-liu
pkg/controller/cronjob 1 44 @mengjiao-liu, kubernetes/kubernetes#113428
pkg/controller/daemon 45 85 @249043822, kubernetes/kubernetes#113622
pkg/controller/deployment 23 79 @249043822, kubernetes/kubernetes#113525
pkg/controller/disruption 29 56
pkg/controller/endpoint 12 24 lunhuijie (Slack)
pkg/controller/endpointslice 22 36
pkg/controller/endpointslicemirroring 18 28
pkg/controller/garbagecollector 55 105 @ncdc, kubernetes/kubernetes#113471
pkg/controller/job 12 36 @sanwishe, kubernetes/kubernetes#113576
pkg/controller/namespace 30 55 @yangjunmyfm192085, kubernetes/kubernetes#113443
pkg/controller/nodeipam 135 210 @yangjunmyfm192085, kubernetes/kubernetes#112670
pkg/controller/nodelifecycle 60 106 @yangjunmyfm192085, kubernetes/kubernetes#112670
pkg/controller/podautoscaler 9 13
pkg/controller/podgc 10 24
pkg/controller/replicaset 20 49
pkg/controller/resourcequota 24 37 @ncdc, kubernetes/kubernetes#113315
pkg/controller/serviceaccount 22 31
pkg/controller/statefulset 19 59
pkg/controller/storageversiongc 4 6 wxs (Slack)
pkg/controller/testutil 9 9 Octopusjust (Slack)
pkg/controller/ttl 4 8 wxs (Slack)
pkg/controller/ttlafterfinished 9 15
pkg/controller/util 0 19
pkg/controller/volume 351 673 @yangjunmyfm192085, kubernetes/kubernetes#113584
pkg/kubelet 1 1805 @fmuyassarov
pkg/scheduler 0 348 @knelasevero, kubernetes/kubernetes#111155
staging/src/k8s.io/apiextensions-apiserver 57 81
staging/src/k8s.io/apimachinery 73 114
staging/src/k8s.io/apiserver 262 543
staging/src/k8s.io/client-go 161 267
staging/src/k8s.io/cloud-provider 108 146
staging/src/k8s.io/cluster-bootstrap 2 4
staging/src/k8s.io/code-generator 108 168
staging/src/k8s.io/component-base 32 63
staging/src/k8s.io/component-helpers 7 8
staging/src/k8s.io/controller-manager 10 10
staging/src/k8s.io/csi-translation-lib 3 4
staging/src/k8s.io/kube-aggregator 52 76
staging/src/k8s.io/kube-controller-manager 0 0
staging/src/k8s.io/kubectl 89 147
staging/src/k8s.io/legacy-cloud-providers 1445 2238
staging/src/k8s.io/mount-utils 54 92
staging/src/k8s.io/pod-security-admission 1 34
staging/src/k8s.io/sample-controller 16 22 @pchan, kubernetes/kubernetes#113879

Created with:

go install sigs.k8s.io/logtools/logcheck@latest

echo "Component | Non-Structured Logging | Non-Contextual Logging" && \
echo "------ | ------- | ------" && \
for i in $(find staging/src/k8s.io/* pkg/controller/* pkg/scheduler pkg/kubelet pkg/apis pkg/api -maxdepth 0 -type d | sort); do \
     echo "$i | $(cd $i; ${GOPATH}/bin/logcheck -check-structured -check-deprecations=false 2>&1 ./... | wc -l ) | $(cd $i; ${GOPATH}/bin/logcheck -check-structured -check-deprecations=false -check-contextual ./... 2>&1 | wc -l )"; \
done
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Dec 6, 2021
@pohly
Copy link
Contributor Author

pohly commented Dec 8, 2021

/sig instrumentation
/wg structured-logging

@k8s-ci-robot k8s-ci-robot added sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 8, 2021
@gracenng gracenng added the tracked/yes Denotes an enhancement issue is actively being tracked by the Release Team label Jan 17, 2022
@gracenng gracenng added this to the v1.24 milestone Jan 17, 2022
@hosseinsalahi
Copy link

hosseinsalahi commented Jan 21, 2022

Hello @pohly

v1.24 Enhancements team here.

Just checking in as we approach enhancements freeze on 18:00pm PT on Thursday Feb 3rd, 2022. This enhancement is targeting alpha for v1.24,

Here’s where this enhancement currently stands:

  • Updated KEP file using the latest template has been merged into the k/enhancements repo.
  • KEP status is marked as implementable for this release
  • KEP has a test plan section filled out.
  • KEP has up to date graduation criteria.
  • KEP has a production readiness review that has been completed and merged into k/enhancements.

The status of this enhancement is marked as tracked. Please keep the issue description and the targeted stage up-to-date for release v1.24.
Thanks!

@pohly
Copy link
Contributor Author

pohly commented Feb 3, 2022

@encodeflush : the KEP PR was merged, all criteria for alpha in 1.24 should be met now.

@chrisnegus
Copy link

chrisnegus commented Feb 11, 2022

Hi @pohly 👋 1.24 Docs shadow here.

This enhancement is marked as 'Needs Docs' for the 1.24 release.

Please follow the steps detailed in the documentation to open a PR against the dev-1.24 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thu March 31, 11:59 PM PDT.

Also, if needed take a look at Documenting for a release to familiarize yourself with the docs requirement for the release.

Thanks!

@valaparthvi
Copy link

valaparthvi commented Mar 21, 2022

Hi @pohly 👋 1.24 Release Comms team here.

We have an opt-in process for the feature blog delivery. If you would like to publish a feature blog for this issue in this cycle, then please opt in on this tracking sheet.

The deadline for submissions and the feature blog freeze is scheduled for 01:00 UTC Wednesday 23rd March 2022 / 18:00 PDT Tuesday 22nd March 2022. Other important dates for delivery and review are listed here: https://github.com/kubernetes/sig-release/tree/master/releases/release-1.24#timeline.

For reference, here is the blog for 1.23.

Please feel free to reach out any time to me or on the #release-comms channel with questions or comments.

Thanks!

@hosseinsalahi
Copy link

hosseinsalahi commented Mar 21, 2022

Hello @pohly

I'm just checking in once more as we approach the 1.24 Code Freeze on 18:00 PDT, Tuesday, March 29th 2022

Please ensure the following items are completed:

For note, the status of this enhancement is currently marked as tracked.

Thank you!

@pohly
Copy link
Contributor Author

pohly commented Mar 23, 2022

/assign

@pohly
Copy link
Contributor Author

pohly commented Mar 23, 2022

I have added two doc PRs to the description.

@Priyankasaggu11929
Copy link
Member

Priyankasaggu11929 commented May 10, 2022

/milestone clear

@k8s-ci-robot k8s-ci-robot removed this from the v1.24 milestone May 10, 2022
@Priyankasaggu11929 Priyankasaggu11929 added tracked/no Denotes an enhancement issue is NOT actively being tracked by the Release Team and removed tracked/yes Denotes an enhancement issue is actively being tracked by the Release Team labels May 10, 2022
@logicalhan
Copy link
Contributor

logicalhan commented May 12, 2022

@pohly can we close this?

@logicalhan
Copy link
Contributor

logicalhan commented May 12, 2022

/assign @serathius

@pohly
Copy link
Contributor Author

pohly commented May 12, 2022

We still need to move this feature through beta to GA, so it has to stay open.

No work is planned for 1.25. I suggest we try to go for beta in 1.26.

@k8s-triage-robot
Copy link

k8s-triage-robot commented Aug 10, 2022

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 10, 2022
@pohly
Copy link
Contributor Author

pohly commented Aug 11, 2022

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 11, 2022
@dashpole dashpole added the stage/alpha Denotes an issue tracking an enhancement targeted for Alpha status label Sep 8, 2022
@logicalhan
Copy link
Contributor

logicalhan commented Sep 15, 2022

Are you guys still planning on beta for 1.26?

@pohly
Copy link
Contributor Author

pohly commented Sep 26, 2022

The instrumentation of kube-scheduler with contextual logging is still in progress. That would have been the first real confirmation of the concept.

So no, let's delay at least until 1.27.

@shivanshu1333
Copy link
Member

shivanshu1333 commented Oct 27, 2022

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. stage/alpha Denotes an issue tracking an enhancement targeted for Alpha status tracked/no Denotes an enhancement issue is NOT actively being tracked by the Release Team wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging.
Projects
None yet
Development

No branches or pull requests