metrics

package
v0.0.0-...-15bed1d Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnState

func ConnState(conn net.Conn, state http.ConnState)

func Init

func Init(namespace string)

Init 初始化失败会抛出panic

func PromMiddleware

func PromMiddleware(promOpts *PromOpts) gin.HandlerFunc

PromMiddleware returns a gin.HandlerFunc for exporting some Web metrics

func RegisterEndpoint

func RegisterEndpoint(router *gin.Engine, endpoint string)

RegisterEndpoint 注册推送接口

Types

type PromOpts

type PromOpts struct {
	ExcludeRegexStatus   string
	ExcludeRegexEndpoint string
	ExcludeRegexMethod   string
}

PromOpts represents the Prometheus middleware Options. It was used for filtering labels with regex.

Jump to

Keyboard shortcuts

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