metrics

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HPAReplicas = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "crane",
			Subsystem: "autoscaling",
			Name:      "hpa_replicas",
			Help:      "Replicas for HPA",
		},
		[]string{"identity"},
	)
	EHPAReplicas = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "crane",
			Subsystem: "autoscaling",
			Name:      "effective_hpa_replicas",
			Help:      "Replicas for Effective HPA",
		},
		[]string{"identity", "strategy"},
	)
)

Functions

func AggregateSignalKey

func AggregateSignalKey(id string, labels []predictionapi.Label) string

func CustomCollectorRegister

func CustomCollectorRegister(collector ...prometheus.Collector)

Types

type TspMetricCollector

type TspMetricCollector struct {
	client.Client
	// contains filtered or unexported fields
}

func NewTspMetricCollector

func NewTspMetricCollector(client client.Client) *TspMetricCollector

func (*TspMetricCollector) Collect

func (c *TspMetricCollector) Collect(ch chan<- prometheus.Metric)

func (*TspMetricCollector) Describe

func (c *TspMetricCollector) Describe(ch chan<- *prometheus.Desc)

Why Implement prometheus collector ? Because the time series prediction timestamp is future timestamp, this way can push timestamp to prometheus if use prometheus metric instrument by default, prometheus scrape will use its own scrape timestamp, so that the prediction time series maybe has wrong timestamps in prom.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL