prom

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HTTPServer for http server
	HTTPServerTimer = NewPromTimer("i2eco_http_server", []string{"app", "env", "method"})

	HTTPServerCounter = NewPromCounter("i2eco_http_server_code", []string{"app", "env", "method", "code"})

	AppBuildInfo = NewPromCounter("i2eco_app_build_info", []string{"app", "env", "version"})
)

Functions

func Register

func Register() common.Caller

Types

type Cfg

type Cfg struct {
}

type PromCounter

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

func NewPromCounter

func NewPromCounter(name string, labels []string) *PromCounter

func (*PromCounter) Add

func (p *PromCounter) Add(name string, v int64, extra ...string)

Add add count v must > 0

func (*PromCounter) Decr

func (p *PromCounter) Decr(name string, extra ...string)

Decr decrements one stat counter without sampling

func (*PromCounter) Incr

func (p *PromCounter) Incr(name string, extra ...string)

Incr increments one stat counter without sampling

func (*PromCounter) Set

func (p *PromCounter) Set(name string, extra ...string)

type PromTimer

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

Prom struct info

func NewPromTimer

func NewPromTimer(name string, labels []string) *PromTimer

New creates a Prom instance.

func (*PromTimer) Timing

func (p *PromTimer) Timing(name string, time int64, extra ...string)

Timing log timing information (in milliseconds) without sampling

Jump to

Keyboard shortcuts

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