metric

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MillisecondsBuckets = []float64{
		10,
		100,
		250,
		500,
		1000,
		1500,
		2000,
		3000,
		5000,
		10000,
	}
	NanosecondsBuckets = []float64{
		float64(100 * time.Nanosecond),
		float64(time.Microsecond),
		float64(10 * time.Microsecond),
		float64(100 * time.Microsecond),
		float64(time.Millisecond),
		float64(10 * time.Millisecond),
		float64(100 * time.Millisecond),
		float64(time.Second),
	}
	MillisecondsHTTPBuckets = []float64{
		100,
		250,
		500,
		1000,
		5000,
	}

	BytesBuckets = []float64{
		1 << 8,
		1 << 10,
		1 << 12,
		1 << 14,
		1 << 16,
		1 << 18,
		1 << 20,
		1 << 22,
	}
)

Functions

func NewNanosecondsLatencyMetric

func NewNanosecondsLatencyMetric(namespace, name string) prometheus.Histogram

Types

type APIInterceptor

type APIInterceptor interface {
	InterceptRequest(i *rpc.RequestInfo) *http.Request
	AfterRequest(i *rpc.RequestInfo)
}

func NewAPIInterceptor

func NewAPIInterceptor(namespace string, registerer prometheus.Registerer) (APIInterceptor, error)

Jump to

Keyboard shortcuts

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