metricsvec

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package metricsvec declares herald's labelled counters and histograms over a go-utils metrics sink. It lives apart from telemetry so the driver modules, which import telemetry through driver, don't pull in go-utils.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterVec

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

CounterVec is a counter declared with label keys over a go-utils sink. A nil *CounterVec records nothing.

func NewCounterVec

func NewCounterVec(m gometrics.Metrics, name, help string, keys ...string) *CounterVec

NewCounterVec declares a counter called name with the given label keys. A nil m returns nil.

func (*CounterVec) Inc

func (c *CounterVec) Inc(values ...string)

Inc adds one to the series for values, in the order the keys were declared.

type HistogramVec

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

HistogramVec is a histogram in seconds declared with label keys over a go-utils sink. A nil *HistogramVec records nothing.

func NewHistogramVec

func NewHistogramVec(m gometrics.Metrics, name, help string, buckets []float64, keys ...string) *HistogramVec

NewHistogramVec declares a histogram in seconds called name with the given buckets and label keys. A nil m returns nil.

func (*HistogramVec) Observe

func (h *HistogramVec) Observe(seconds float64, values ...string)

Observe records seconds on the series for values, in the order the keys were declared.

Jump to

Keyboard shortcuts

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