metrics

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MetricsNamespace = "prom_agg_gateway"

Variables

View Source
var ErrOddNumberOfLabelParts = errors.New("labels must be defined in pairs")
View Source
var MetricCountByFamily = prometheus.NewGaugeVec(
	prometheus.GaugeOpts{
		Namespace: MetricsNamespace,
		Name:      "metrics_by_family",
		Help:      "Metric count by family",
	},
	[]string{
		"family",
	},
)
View Source
var MetricCountByType = prometheus.NewGaugeVec(
	prometheus.GaugeOpts{
		Namespace: MetricsNamespace,
		Name:      "metrics_by_type",
		Help:      "Metric count by type",
	},
	[]string{
		"metric_type",
	},
)
View Source
var MetricPushes = prometheus.NewCounterVec(
	prometheus.CounterOpts{
		Namespace: MetricsNamespace,
		Name:      "metric_pushes",
		Help:      "Total number of metric push requests, per job",
	},
	[]string{
		"push_job",
	},
)
View Source
var PromRegistry = prometheus.NewRegistry()
View Source
var TotalFamiliesGauge = prometheus.NewGauge(
	prometheus.GaugeOpts{
		Namespace: MetricsNamespace,
		Name:      "total_families",
		Help:      "Total number of metric families",
	},
)

Functions

func AddIgnoredLabels

func AddIgnoredLabels(ignoredLabels ...string) aggregateOptionsFunc

func SetTTLMetricTime

func SetTTLMetricTime(duration *time.Duration) aggregateOptionsFunc

Types

type Aggregate

type Aggregate struct {
	// contains filtered or unexported fields
}

func NewAggregate

func NewAggregate(opts ...aggregateOptionsFunc) *Aggregate

func (*Aggregate) HandleInsert

func (a *Aggregate) HandleInsert(c *gin.Context)

func (*Aggregate) HandleRender

func (a *Aggregate) HandleRender(c *gin.Context)

func (*Aggregate) Len

func (a *Aggregate) Len() int

Jump to

Keyboard shortcuts

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