metrics

package
v0.0.0-...-3d0e6ac Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const NameSpace = "ns"

Variables

View Source
var (
	ResponseTime = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: NameSpace,
			Name:      "http_response_time_milliseconds",
			Help:      "Histogram of RT for HTTP requests (ms).",
			Buckets:   buckets,
		},
		[]string{"code", "handler", "method"},
	)

	ResponseTimeExternal = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: NameSpace,
			Name:      "external_http_response_time_milliseconds",
			Help:      "Histogram of RT for outgoing HTTP requests (ms).",
			Buckets:   buckets,
		},
		[]string{"service", "code", "handler", "method"},
	)

	HandlerDuration = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: NameSpace,
			Name:      "handler_duration_ms",
			Help:      "Histogram of duration (ms) of handlers.",
			Buckets:   buckets,
		},
		[]string{"handler", "err", "retries"},
	)

	NetworkErrorCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: NameSpace,
			Name:      "network_error_counter",
			Help:      "Counter of network errors.",
		},
		[]string{"service", "handler", "type"},
	)
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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