metrics

package
v0.0.0-...-f04b8cf Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DataFromClient is a counter for the total number of bytes transferred from client to server through the proxy.
	DataFromClient = prometheus.NewCounter(prometheus.CounterOpts{
		Name: "proxy_data_from_client_bytes_total",
		Help: "Total number of bytes transferred from client to server through the proxy.",
	})
	// DataToClient is a counter for the total number of bytes transferred from server to client through the proxy.
	DataToClient = prometheus.NewCounter(prometheus.CounterOpts{
		Name: "proxy_data_to_client_bytes_total",
		Help: "Total number of bytes transferred from server to client through the proxy.",
	})
	// LastRequestLatency is a gauge for the latency of the last proxy request.
	LastRequestLatency = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "proxy_last_request_latency_seconds",
		Help: "The latency of the last proxy request in seconds.",
	})
)

Functions

func DecrementProxyConnections

func DecrementProxyConnections()

DecrementProxyConnections decrements the proxy connections counter.

func IncrementDataFromClient

func IncrementDataFromClient()

IncrementDataFromClient increments the data from client counter.

func IncrementDataToClient

func IncrementDataToClient()

IncrementDataToClient increments the data to client counter.

func IncrementProxyConnections

func IncrementProxyConnections()

IncrementProxyConnections increments the proxy connections counter.

func IncrementProxyErrors

func IncrementProxyErrors()

IncrementProxyErrors increments the proxy errors counter.

func NewCounterWriter

func NewCounterWriter(counter prometheus.Counter) io.Writer

NewCounterWriter creates a new io.Writer that increments the given counter.

func StartMetricsServer

func StartMetricsServer()

StartMetricsServer starts the metrics server on the configured port.

Types

This section is empty.

Jump to

Keyboard shortcuts

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