Merge pull request #111109 from azylinski/apf-seats-httplog

Always log APF WorkEstimate params in kube-apiserver http logs
This commit is contained in:
Kubernetes Prow Robot 2022-07-13 22:51:03 -07:00 committed by GitHub
commit 08f9125cb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,14 +125,10 @@ func WithPriorityAndFairness(
workEstimate := workEstimator(r, classification.FlowSchemaName, classification.PriorityLevelName) workEstimate := workEstimator(r, classification.FlowSchemaName, classification.PriorityLevelName)
fcmetrics.ObserveWorkEstimatedSeats(classification.PriorityLevelName, classification.FlowSchemaName, workEstimate.MaxSeats()) fcmetrics.ObserveWorkEstimatedSeats(classification.PriorityLevelName, classification.FlowSchemaName, workEstimate.MaxSeats())
// nolint:logcheck // Not using the result of klog.V httplog.AddKeyValue(ctx, "apf_iseats", workEstimate.InitialSeats)
// inside the if branch is okay, we just use it to httplog.AddKeyValue(ctx, "apf_fseats", workEstimate.FinalSeats)
// determine whether the additional information should httplog.AddKeyValue(ctx, "apf_additionalLatency", workEstimate.AdditionalLatency)
// be added.
if klog.V(4).Enabled() {
httplog.AddKeyValue(ctx, "apf_iseats", workEstimate.InitialSeats)
httplog.AddKeyValue(ctx, "apf_fseats", workEstimate.FinalSeats)
}
return workEstimate return workEstimate
} }