* 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>
32 lines
638 B
Go
32 lines
638 B
Go
package storagesvc
|
|
|
|
import (
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
"github.com/fission/fission/pkg/utils/metrics"
|
|
)
|
|
|
|
var (
|
|
functionLabels = []string{}
|
|
totalArchives = prometheus.NewGaugeVec(
|
|
prometheus.GaugeOpts{
|
|
Name: "fission_archives",
|
|
Help: "Number of archives stored",
|
|
},
|
|
functionLabels,
|
|
)
|
|
totalMemoryUsage = prometheus.NewGaugeVec(
|
|
prometheus.GaugeOpts{
|
|
Name: "fission_archive_memory_bytes",
|
|
Help: "Amount of memory consumed by archives",
|
|
},
|
|
functionLabels,
|
|
)
|
|
)
|
|
|
|
func init() {
|
|
registry := metrics.Registry
|
|
registry.MustRegister(totalArchives)
|
|
registry.MustRegister(totalMemoryUsage)
|
|
}
|