metrics

package module
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 6 Imported by: 0

README

Build Status Code Coverage Go Report Card GoDoc

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Options singleton

Functions

This section is empty.

Types

type Counter

type Counter interface {
	Metric

	Increment()
	IncrementN(uint64)

	Value() uint64
}

func NewCounter

func NewCounter(name string, options ...option) Counter

type Exporter

type Exporter interface {
	http.Handler

	Add(...Metric)
}

func NewExporter

func NewExporter() Exporter

type Gauge

type Gauge interface {
	Metric

	Increment()
	IncrementN(int64)
	Measure(int64)

	Value() int64
}

func NewGauge

func NewGauge(name string, options ...option) Gauge

type Histogram added in v2.1.0

type Histogram interface {
	Metric

	Measure(uint64)

	Buckets() []uint64
	Value(bucket uint64) uint64
	Count() uint64
	Sum() uint64
}

func NewHistogram added in v2.1.0

func NewHistogram(name string, options ...option) Histogram

type Metric

type Metric interface {
	Type() string
	Name() string
	Description() string
	Labels() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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