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 ¶
Types ¶
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 ¶
New creates a Prom instance.
Click to show internal directories.
Click to hide internal directories.