prom

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCode

func AddCode(target string, app string, method string, event string, version string, code string)

AddCode .

func AddCommonLog

func AddCommonLog(target string, app string, method string, event string, version string, v int64)

AddCommonLog .

func AddDetailedLog

func AddDetailedLog(target string, app string, method string, event string, version string, details map[string]int64)

AddDetailedLog .

func AddHTTPCode

func AddHTTPCode(target string, app string, method string, event string, version string, code string)

AddHTTPCode .

func Init

func Init(ce *conf.Config)

Init .

func NewProm

func NewProm(isFirst bool)

NewProm .

Types

type Prom

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

Prom struct info

var (
	// HTTPClientSum HTTP Client request cost sum.
	HTTPClientSum *Prom
	// HTTPClientCount HTTP Client request count.
	HTTPClientCount *Prom
	// HTTPClientCode HTTP Client request server code count.
	HTTPClientCode *Prom
	// HTTPClientStatus HTTP Client request status.
	HTTPClientStatus *Prom
	// HTTPClientSummary HTTP Client request quantiles.
	HTTPClientSummary *Prom
)

func New

func New() *Prom

New creates a Prom instance.

func (*Prom) Add

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

Add add count v must > 0

func (*Prom) Decr

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

Decr decrements one stat counter without sampling

func (*Prom) Incr

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

Incr increments one stat counter without sampling

func (*Prom) State

func (p *Prom) State(name string, v int64, extra ...string)

State set state

func (*Prom) Timing

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

Timing log timing information (in milliseconds) without sampling

func (*Prom) Unregister

func (p *Prom) Unregister()

Unregister .

func (*Prom) WithCounter

func (p *Prom) WithCounter(name string, labels []string) *Prom

WithCounter sets counter.

func (*Prom) WithQuantile

func (p *Prom) WithQuantile(name string, labels []string) *Prom

WithQuantile sets quantiles.

func (*Prom) WithState

func (p *Prom) WithState(name string, labels []string) *Prom

WithState sets state.

func (*Prom) WithTimer

func (p *Prom) WithTimer(name string, labels []string) *Prom

WithTimer with summary timer

Jump to

Keyboard shortcuts

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