metrics

package
v0.1.8-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeHTTPRequests

func ServeHTTPRequests(addr string, path string)

ServeHTTPRequests starts http service for handle metrics

Types

type Collector

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

Collector provides interface for accessing and modification of metrics

func NewCollector

func NewCollector(bucketsString string) (*Collector, error)

NewCollector is a constructor for Collector singleton

func (*Collector) DeleteThrottlingDelay

func (collector *Collector) DeleteThrottlingDelay(namespace string, podName string, containerName string) bool

DeleteThrottlingDelay should be used to delete gauge series with specified labels

func (*Collector) IncrementHTTPRequestCount

func (collector *Collector) IncrementHTTPRequestCount(podName, method, service, path string, status int)

IncrementHTTPRequestCount i.golovchenko: don't like this interface actually, probably needs refactoring

func (*Collector) IncrementHTTPRequestsTotalCount

func (collector *Collector) IncrementHTTPRequestsTotalCount(service string)

IncrementHTTPRequestsTotalCount increments corresponding metric

func (*Collector) IncrementLogMessageCount

func (collector *Collector) IncrementLogMessageCount(
	namespace string, podName string, containerName string)

IncrementLogMessageCount increments corresponding metric

func (*Collector) IncrementThrottlingDelay

func (collector *Collector) IncrementThrottlingDelay(namespace string, podName string, containerName string, value float64)

IncrementThrottlingDelay increments value of corresponding metric

func (*Collector) ObserveHTTPRequestTime

func (collector *Collector) ObserveHTTPRequestTime(
	podName, method, service, path string, value float64)

ObserveHTTPRequestTime should be used to make observations of corresponding metric

func (*Collector) ObserveHTTPUpstreamResponseTimeTotal

func (collector *Collector) ObserveHTTPUpstreamResponseTimeTotal(
	podName, method, service, path string, value float64)

ObserveHTTPUpstreamResponseTimeTotal should be used to make observations of corresponding metric

func (*Collector) Retrieve

func (collector *Collector) Retrieve() error

Retrieve resets metrics

Jump to

Keyboard shortcuts

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