metric

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ENV      = "env"
	APP = "snow"
	VER = "ver"
)

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

func Init

func Init(opts ...Option)

func RegisterCollector

func RegisterCollector(c ...prometheus.Collector)

Types

type Option

type Option func(opt *Options)

func AppVer

func AppVer(app, ver string) Option

添加App和Ver label

func EnableProcess

func EnableProcess() Option

收集进程信息

func EnableRuntime

func EnableRuntime() Option

func WithLabel

func WithLabel(key, val string) Option

添加额外label

type Options

type Options struct {
	// contains filtered or unexported fields
}

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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