metrics

package
v0.0.0-...-47b6ad5 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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, prefix 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