metrics

package
v0.0.0-...-78446d3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// WSConnections metrics on the active number of connections over time.
	WSConnections = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "sockety",
		Subsystem: "websocket",
		Name:      "connections",
		Help:      "Number of active web socket connections",
	}, []string{"service", "category", "sub_category"})

	// WSMessages any non server error by path and status code
	WSMessages = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "sockety",
		Subsystem: "websocket",
		Name:      "messages",
		Help:      "size of messages being sent over the websocket",
	}, []string{"service", "category", "sub_category", "type"})

	// StatusErrors any non server error by path and status code
	StatusErrors = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: "sockety",
		Subsystem: "apis",
		Name:      "status_code",
		Help:      "status codes per api",
	}, []string{"path", "status"})

	// ServerErrors any server errors by path
	ServerErrors = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: "sockety",
		Subsystem: "apis",
		Name:      "errors",
		Help:      "The error count per api",
	}, []string{"path"})
)

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