prom

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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