metrics

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCMetrics

func GRPCMetrics(opts ...Options) middleware.Middleware

func HTTPMetrics

func HTTPMetrics(opts ...Options) middleware.HTTPMiddleware

Types

type Counter

type Counter interface {
	Inc()
	Add(float64)
	Values(...string) Counter
}

func NewCounter

func NewCounter(opts prometheus.CounterOpts, labels []string) Counter

type Gauge

type Gauge interface {
	Set(float64)
	Inc()
	Add(v float64)
	Values(...string) Gauge
}

func NewGauge

func NewGauge(opts prometheus.GaugeOpts, labels []string) Gauge

type Histogram

type Histogram interface {
	Observe(float64)
	Values(...string) Histogram
}

func NewHistogram

func NewHistogram(opts prometheus.HistogramOpts, labels []string) Histogram

type Options

type Options func(*option)

func WithCounter

func WithCounter(c Counter) Options

func WithGauge

func WithGauge(g Gauge) Options

func WithHistogram

func WithHistogram(h Histogram) Options

Jump to

Keyboard shortcuts

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