metrics

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MPL-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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