metrics

package
v0.0.0-...-805facf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BulkheadFullCount = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "bulkhead_full_exception_count",
		Help: "The total number of bulkhead full exception events",
	}, []string{"bulkhead"})
	BulkheadWaitMSSum = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "bulkhead_incr_wait_sum_ms",
		Help: "The sum of time spent in bulkhead Incr in ms",
	}, []string{"bulkhead"})
	BulkheadBufferLength = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "bulkhead_buffer_length",
		Help: "The number of requests that are in the bulkhead buffer",
	}, []string{"bulkhead"})
	BulkheadMaxBufferLength = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "bulkhead_max_buffer_length",
		Help: "The max number of requests that can be in the bulkhead buffer",
	}, []string{"bulkhead"})
	RetryCountTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "retry_count_total",
		Help: "The total retry count of requests",
	}, []string{"request"})
	HTTPResponseCode = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "http_response_codes_total",
		Help: "The total count of response codes for requests",
	}, []string{"request", "code"})
	HTTPResponseSize = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "http_response_size_total",
		Help: "The total size of response for requests",
	}, []string{"request", "code"})
)

Functions

func IncrBulkheadFull

func IncrBulkheadFull(name string)

func IncrBulkheadWaitSum

func IncrBulkheadWaitSum(name string, t time.Duration)

func IncrHTTPResponseCode

func IncrHTTPResponseCode(name, code string)

func IncrHTTPResponseSize

func IncrHTTPResponseSize(name, code string, value float64)

func IncrRetryCountTotal

func IncrRetryCountTotal(name string)

func ObserveHTTPResponseLatency

func ObserveHTTPResponseLatency(name, code string, value float64)

func SetBulkheadBufferLength

func SetBulkheadBufferLength(name string, value float64)

func SetBulkheadMaxBufferLength

func SetBulkheadMaxBufferLength(name string, value float64)

Types

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

func New

func New() *Metrics

func (*Metrics) Build

func (m *Metrics) Build() *Metrics

func (*Metrics) GetCounterValue

func (m *Metrics) GetCounterValue(col prometheus.Collector) (float64, error)

func (*Metrics) GetGaugeValue

func (m *Metrics) GetGaugeValue(col prometheus.Collector) (float64, error)

func (*Metrics) WithBuckets

func (m *Metrics) WithBuckets(b []float64) *Metrics

func (*Metrics) WithRegisterer

func (m *Metrics) WithRegisterer(r prometheus.Registerer) *Metrics

Jump to

Keyboard shortcuts

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