Files
fission-src/pkg/storagesvc/metrics.go
T
Sanket SudakeandGitHub 5fae765323 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>
2022-12-13 14:19:36 +05:30

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)
}