Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportMetricsToPrometheus ¶
ReportMetricsToPrometheus report metrics to prometheus registry, you can use GetSystemPrometheusRegistry to get prometheus registry. by default chassis will report system metrics to prometheus
Types ¶
type PrometheusSinker ¶
type PrometheusSinker struct { Registry gometrics.Registry // Registry to be exported FlushInterval time.Duration //interval to update prom metrics // contains filtered or unexported fields }
PrometheusSinker is the struct for prometheus configuration parameters
var DefaultPrometheusSinker *PrometheusSinker
DefaultPrometheusSinker variable for default prometheus configurations
func GetPrometheusSinker ¶
func GetPrometheusSinker(mr gometrics.Registry) *PrometheusSinker
GetPrometheusSinker get prometheus configurations
func NewPrometheusProvider ¶
func NewPrometheusProvider(r gometrics.Registry, FlushInterval time.Duration) *PrometheusSinker
NewPrometheusProvider returns the object of prometheus configurations
func (*PrometheusSinker) UpdatePrometheusMetrics ¶
func (c *PrometheusSinker) UpdatePrometheusMetrics()
UpdatePrometheusMetrics update prometheus metrics
func (*PrometheusSinker) UpdatePrometheusMetricsOnce ¶
func (c *PrometheusSinker) UpdatePrometheusMetricsOnce() error
UpdatePrometheusMetricsOnce update prometheus metrics once
Click to show internal directories.
Click to hide internal directories.