metrics

package
v0.0.0-...-8c24509 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendLables

func AppendLables(metricsNames []string, metricsBody []byte, labels []*io_prometheus_client.LabelPair) ([]byte, error)

AppendLables add the labels you give in the list to the metrics names(metricsNames) pressent in metricBody(should be a plain text metrics) and return the new metrics body with the labels. If metricsNames is empty the labels will be apply to all metrics in metricsBody

func FindMetricsNames

func FindMetricsNames(metricsBody []byte) (mtrNames []string, err error)

FindMetricsNames return all the metric names

func FindMetricsNamesWithoutLabels

func FindMetricsNamesWithoutLabels(metricsBody []byte, labels []string) (mtrNames []string, err error)

FindMetricsNamesWithoutLabels return all the metric names that not have at least one of the labels in parameters

Types

type DefaultFordwaderMetrics

type DefaultFordwaderMetrics struct {
	FordwaderResponseDuration      *prometheus.GaugeVec
	FordwaderScrapeDurationSeconds *prometheus.GaugeVec
}

DefaultFordwaderMetrics default metrics for metrics fordwader

func NewDefaultFordwaderMetrics

func NewDefaultFordwaderMetrics() (fordwaderMetrics *DefaultFordwaderMetrics)

NewDefaultFordwaderMetrics create a new DefaultFordwaderMetrics

func (DefaultFordwaderMetrics) MustRegister

func (fordwaderMetrics DefaultFordwaderMetrics) MustRegister()

MustRegister register default metrics for metrics fordwader in prometheus

Jump to

Keyboard shortcuts

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