Documentation ¶
Index ¶
- Variables
- func CounterAdd(name string, v float64)
- func CounterInc(name string)
- func ElapsedMs(name string) func()
- func GaugeAdd(name string, v float64)
- func GaugeDec(name string)
- func GaugeInc(name string)
- func GaugeSet(name string, v float64)
- func HistAdd[T number](name string, v T)
- func Init(ctx context.Context, namespace string, port int)
- func NewCounter(name string)
- func NewGauge(name string)
- func NewHistogram(name string, buckets ...float64)
- func RegisterDiskMetrics(ctx context.Context) error
- func RegisterIfaceMetrics(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
var (
ElapsedBucketsInMs = []float64{
0, 10, 20, 30, 40, 50, 60, 70, 80, 90,
100, 200, 300, 400, 500, 600, 700, 800, 900,
1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000,
}
)
Functions ¶
func CounterAdd ¶
func CounterInc ¶
func CounterInc(name string)
func NewHistogram ¶
NewHistogram declares a new histogram. Buckets defines the buckets into which observations are counted. Each element in the slice is the upper inclusive bound of a bucket. The values must be sorted in strictly increasing order. There is no need to add a highest bucket with +Inf bound, it will be added implicitly. If Buckets is left as nil or set to a slice of length zero, it is replaced by default buckets. The default buckets are DefBuckets if no buckets for a native histogram (see below) are used, otherwise the default is no buckets. (In other words, if you want to use both reguler buckets and buckets for a native histogram, you have to define the regular buckets here explicitly.)
func RegisterDiskMetrics ¶
func RegisterIfaceMetrics ¶
Types ¶
This section is empty.