github.com/cilium/cilium@v1.16.2/pkg/clustermesh/operator/metrics.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package operator 5 6 import ( 7 "github.com/cilium/cilium/pkg/metrics" 8 "github.com/cilium/cilium/pkg/metrics/metric" 9 ) 10 11 type Metrics struct { 12 // TotalGlobalServices tracks the total number of global services. 13 TotalGlobalServices metric.Vec[metric.Gauge] 14 } 15 16 func NewMetrics() Metrics { 17 return Metrics{ 18 TotalGlobalServices: metric.NewGaugeVec(metric.GaugeOpts{ 19 Namespace: metrics.CiliumOperatorNamespace, 20 Subsystem: subsystem, 21 Name: "global_services", 22 Help: "The total number of global services in the cluster mesh", 23 }, []string{metrics.LabelSourceCluster}), 24 } 25 }