Documentation ¶
Index ¶
- func Converter(converter MetricConverter) optSetter
- func DefaultKeyNormalizer(key string) string
- func DefaultMetricConverter(name string, i interface{}) (float64, error)
- func FlushRate(duration time.Duration) optSetter
- func KeyNormalizer(normalizer Normalizer) optSetter
- func LowerCaseKeyNormalizer(key string) string
- type MetricConverter
- type Normalizer
- type PrometheusConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Converter ¶
func Converter(converter MetricConverter) optSetter
func DefaultKeyNormalizer ¶
func DefaultMetricConverter ¶
func KeyNormalizer ¶
func KeyNormalizer(normalizer Normalizer) optSetter
func LowerCaseKeyNormalizer ¶
Types ¶
type MetricConverter ¶
type Normalizer ¶
type PrometheusConfig ¶
type PrometheusConfig struct { Namespace string Subsystem string FlushInterval time.Duration //interval to update prom metrics // contains filtered or unexported fields }
func NewPrometheusProvider ¶
func NewPrometheusProvider(r metrics.Registry, namespace string, subsystem string, promRegistry prometheus.Registerer, setters ...optSetter) (*PrometheusConfig, error)
NewPrometheusProvider returns a Provider that produces Prometheus metrics. Namespace and Subsystem are applied to all produced metrics.
func (*PrometheusConfig) UpdatePrometheusMetrics ¶
func (c *PrometheusConfig) UpdatePrometheusMetrics()
func (*PrometheusConfig) UpdatePrometheusMetricsOnce ¶
func (c *PrometheusConfig) UpdatePrometheusMetricsOnce() error
Click to show internal directories.
Click to hide internal directories.