Use client generator to generate all k8s clients and add respective client-go metrics (#2668)
* Define client generator to generate all k8s clients * Increase QPS and burst values * Capture client-go metrics * Support for controller runtime metrics Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -2,19 +2,20 @@ package storagesvc
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
|
||||
"github.com/fission/fission/pkg/utils/metrics"
|
||||
)
|
||||
|
||||
var (
|
||||
functionLabels = []string{}
|
||||
totalArchives = promauto.NewGaugeVec(
|
||||
totalArchives = prometheus.NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Name: "fission_archives",
|
||||
Help: "Number of archives stored",
|
||||
},
|
||||
functionLabels,
|
||||
)
|
||||
totalMemoryUsage = promauto.NewGaugeVec(
|
||||
totalMemoryUsage = prometheus.NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Name: "fission_archive_memory_bytes",
|
||||
Help: "Amount of memory consumed by archives",
|
||||
@@ -22,3 +23,9 @@ var (
|
||||
functionLabels,
|
||||
)
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry := metrics.Registry
|
||||
registry.MustRegister(totalArchives)
|
||||
registry.MustRegister(totalMemoryUsage)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user