metric

package
v16.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientStatsHandler

func ClientStatsHandler() *promgrpc.StatsHandler

ClientStatsHandler is a simplified promgrpc.ClientStatsHandler().

func Register

func Register(registerer prometheus.Registerer, toRegister ...prometheus.Collector) error

func ServerStatsHandler

func ServerStatsHandler() *promgrpc.StatsHandler

ServerStatsHandler is a simplified promgrpc.ServerStatsHandler().

Types

type Counter added in v16.2.0

type Counter interface {
	// Inc increment the counter by 1
	Inc()
}

type MultiCounter added in v16.2.0

type MultiCounter []Counter

MultiCounter wraps multiple counters into "one" This is can be useful when having a prometheus and a usage_metric counter for the same metric.

func NewMultiCounter added in v16.2.0

func NewMultiCounter(counters ...Counter) MultiCounter

NewMultiCounter wraps multiple counters into a single one. Every call to Inc() will be dispatched to each counter.

func (MultiCounter) Inc added in v16.2.0

func (m MultiCounter) Inc()

type OtelErrorHandler

type OtelErrorHandler zap.Logger

func (*OtelErrorHandler) Handle

func (h *OtelErrorHandler) Handle(err error)

Jump to

Keyboard shortcuts

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