metrics

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close the underlying client connection if supported.

func Count

func Count(name string, value int64, tags ...Tag)

Count tracks how many times something happened.

func CreateHandler

func CreateHandler(log *zap.Logger) (http.Handler, error)

CreateHandler create an http.Handler if supported by the client. Otherwise an error will be returned.

func Gauge

func Gauge(name string, value int64, tags ...Tag)

Gauge measures the value of a metric at a particular time.

func GaugeAdd

func GaugeAdd(name string, value int64, tags ...Tag)

GaugeAdd adds a new measure to a gauge.

func Histogram

func Histogram(name string, value float64, tags ...Tag)

Histogram tracks the statistical distribution of a set of values.

func InitMetricsClient

func InitMetricsClient(logger *zap.Logger, clientType string) error

Types

type ClientType

type ClientType int
const (
	NoOp ClientType = iota
	Datadog
	Prometheus
)

func ParseClientType

func ParseClientType(clientType string) (ClientType, error)

func (ClientType) String

func (c ClientType) String() string

type Tag

type Tag struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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