collector

package
v0.0.0-...-afcd4c4 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CrautiProcessedRequestsTotal = "crauti_processed_requests_total"
	CrautiRequestLatency         = "crauti_request_latency"
	CrautiUpstreamRequestLatency = "crauti_upstream_request_latency"
	CrautiCacheTotal             = "crauti_cache_total"
)

Variables

This section is empty.

Functions

func MetricsInstance

func MetricsInstance() *metrics

Types

type CollectorMiddleware

type CollectorMiddleware struct {
	middleware.Middleware
	// contains filtered or unexported fields
}

The collector middleare, lives for the entire request duration. It needs to be the first middleware executed. It will collect all sort of metrics and request related stuff like response status and stuff.

func (*CollectorMiddleware) Init

func (*CollectorMiddleware) ServeHTTP

func (m *CollectorMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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