monitor

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MulanPSL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromHandler

func PromHandler(handler http.Handler) gin.HandlerFunc

PromHandler 返回一个包装好的gin.HandlerFunc

func PromMiddleware

func PromMiddleware(promOpt *PromOpts) gin.HandlerFunc

PromMiddleware 返回一个暴露metrics的gin.HandleFunc

Types

type PromOpts

type PromOpts struct {
	ExcludeRegexStatus     string
	ExcludeRegexEndpoint   string
	ExcludeRegexMethod     string
	EndpointLabelMappingFn RequestLabelMappingFn
}

PromOpts Prometheus中间价选项

func NewDefaultOpts

func NewDefaultOpts() *PromOpts

NewDefaultOpts 返回一个默认的PromOpts

type RequestLabelMappingFn

type RequestLabelMappingFn func(c *gin.Context) string

请求标签映射

Jump to

Keyboard shortcuts

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