kubelet-tracing:update

Signed-off-by: Sally O'Malley <somalley@redhat.com>
This commit is contained in:
Sally O'Malley 2022-07-11 20:49:52 -04:00
parent 5b4456ceea
commit 7585aae1b4
Failed to extract signature
3 changed files with 8 additions and 4 deletions

View File

@ -63,8 +63,8 @@ import (
"k8s.io/component-base/logs" "k8s.io/component-base/logs"
compbasemetrics "k8s.io/component-base/metrics" compbasemetrics "k8s.io/component-base/metrics"
"k8s.io/component-base/metrics/legacyregistry" "k8s.io/component-base/metrics/legacyregistry"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
tracing "k8s.io/component-base/tracing" tracing "k8s.io/component-base/tracing"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
podresourcesapi "k8s.io/kubelet/pkg/apis/podresources/v1" podresourcesapi "k8s.io/kubelet/pkg/apis/podresources/v1"
podresourcesapiv1alpha1 "k8s.io/kubelet/pkg/apis/podresources/v1alpha1" podresourcesapiv1alpha1 "k8s.io/kubelet/pkg/apis/podresources/v1alpha1"
"k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/legacyscheme"
@ -135,7 +135,9 @@ type filteringContainer struct {
} }
func (a *filteringContainer) Handle(path string, handler http.Handler) { func (a *filteringContainer) Handle(path string, handler http.Handler) {
if utilfeature.DefaultFeatureGate.Enabled(features.KubeletTracing) {
handler = tracing.WithTracing(handler, a.TracerProvider, "kubelet") handler = tracing.WithTracing(handler, a.TracerProvider, "kubelet")
}
a.HandleWithFilter(path, handler) a.HandleWithFilter(path, handler)
a.registeredHandlePaths = append(a.registeredHandlePaths, path) a.registeredHandlePaths = append(a.registeredHandlePaths, path)
} }

View File

@ -1,7 +1,9 @@
# See the OWNERS docs at https://go.k8s.io/owners # See the OWNERS docs at https://go.k8s.io/owners
options:
no_parent_owners: true
approvers: approvers:
- sig-instrumentation-approvers - api-approvers
reviewers: reviewers:
- sig-instrumentation-reviewers - sig-instrumentation-reviewers
labels: labels:

View File

@ -1,5 +1,5 @@
/* /*
Copyright 2018 The Kubernetes Authors. Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.