mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
move prometheus init to k8s.io/apiserver/pkg/endpoints/metrics/metrics.go
This commit is contained in:
parent
bc361fae40
commit
631119a7d6
@ -60,7 +60,6 @@ go_test(
|
|||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
"apiserver.go",
|
|
||||||
"doc.go",
|
"doc.go",
|
||||||
"groupversion.go",
|
"groupversion.go",
|
||||||
"installer.go",
|
"installer.go",
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2014 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package endpoints
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apiserver/pkg/endpoints/metrics"
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
metrics.Register()
|
|
||||||
}
|
|
@ -81,8 +81,8 @@ var (
|
|||||||
kubectlExeRegexp = regexp.MustCompile(`^.*((?i:kubectl\.exe))`)
|
kubectlExeRegexp = regexp.MustCompile(`^.*((?i:kubectl\.exe))`)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Register all metrics.
|
func init() {
|
||||||
func Register() {
|
// Register all metrics.
|
||||||
prometheus.MustRegister(requestCounter)
|
prometheus.MustRegister(requestCounter)
|
||||||
prometheus.MustRegister(longRunningRequestGauge)
|
prometheus.MustRegister(longRunningRequestGauge)
|
||||||
prometheus.MustRegister(requestLatencies)
|
prometheus.MustRegister(requestLatencies)
|
||||||
|
Loading…
Reference in New Issue
Block a user