prom

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableRunTimeMetrics

func EnableRunTimeMetrics()

EnableRunTimeMetrics enable runtime metrics

func ReportMetricsToPrometheus

func ReportMetricsToPrometheus(r gometrics.Registry) error

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

Jump to

Keyboard shortcuts

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