metrics

package
v0.0.0-...-50a15a0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpRequestsInFlight         prometheus.Gauge
	HttpRequestDurationHistogram *prometheus.HistogramVec
)

Functions

func CountApiRequests

func CountApiRequests(status int)

func CountGRPCRequests

func CountGRPCRequests(status int)

func CountPageRequests

func CountPageRequests(status int)

func SanitizeCode

func SanitizeCode(s int) string

func SanitizeMethod

func SanitizeMethod(m string) string

Types

type Config

type Config struct {
	RestPrefix string
	GRPCPrefix string
}

type MetricsMiddleware

type MetricsMiddleware func(handler string) ncsfw.MiddlewareFunc

func RequestMetrics

func RequestMetrics(cfg *Config) MetricsMiddleware

Jump to

Keyboard shortcuts

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