Skip to content

Commit

Permalink
promote contextual logging to beta, enabled by default
Browse files Browse the repository at this point in the history
As discussed in
kubernetes/enhancements#4219 (comment)
benchstat reports no significant difference in most test cases for
scheduler_perf for -v3. At -v5, there is some slowdown, but that is justified
because the output becomes more useful for debugging.

Enabling the feature by default ensures that log output becomes better
regardless whether users know and remember to enable it.
  • Loading branch information
pohly authored and ah8ad3 committed Apr 6, 2024
1 parent 50458e2 commit b69fcc3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions staging/src/k8s.io/component-base/logs/api/v1/kube_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ const (
// owner: @pohly
// kep: https://kep.k8s.io/3077
// alpha: v1.24
// beta: v1.30
//
// Enables looking up a logger from a context.Context instead of using
// the global fallback logger and manipulating the logger that is
// used by a call chain.
ContextualLogging featuregate.Feature = "ContextualLogging"

// contextualLoggingDefault must remain false while in alpha. It can
// become true in beta.
contextualLoggingDefault = false
// contextualLoggingDefault is now true because the feature reached beta
// and performance comparisons showed no relevant degradation when
// enabling it.
contextualLoggingDefault = true

// Allow fine-tuning of experimental, alpha-quality logging options.
//
Expand All @@ -57,7 +59,7 @@ const (

func featureGates() map[featuregate.Feature]featuregate.FeatureSpec {
return map[featuregate.Feature]featuregate.FeatureSpec{
ContextualLogging: {Default: contextualLoggingDefault, PreRelease: featuregate.Alpha},
ContextualLogging: {Default: contextualLoggingDefault, PreRelease: featuregate.Beta},

LoggingAlphaOptions: {Default: false, PreRelease: featuregate.Alpha},
LoggingBetaOptions: {Default: true, PreRelease: featuregate.Beta},
Expand Down

0 comments on commit b69fcc3

Please sign in to comment.