Documentation ¶
Index ¶
- type Prom
- func (p *Prom) Add(name string, v int64, extra ...string)
- func (p *Prom) Incr(name string, extra ...string)
- func (p *Prom) ResetCounter() *Prom
- func (p *Prom) ResetState() *Prom
- func (p *Prom) State(name string, v int64, extra ...string)
- func (p *Prom) Timing(name string, time int64, extra ...string)
- func (p *Prom) WithCounter(name, desc string, labels []string) *Prom
- func (p *Prom) WithState(name, desc string, labels []string) *Prom
- func (p *Prom) WithTimer(name, desc string, labels []string) *Prom
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prom ¶
type Prom struct {
// contains filtered or unexported fields
}
Prom present prom metrics
You can add metrics like below
SomeGaugeMetric = New().WithState("gauge_metric_name", "gauge metric name", []string{ labels... })
and set state via `SomeGaugeMetric.State("gauge_metric_label_name", gauge_value, extra_labels...)`
func (*Prom) WithCounter ¶
WithCounter sets counter.
Click to show internal directories.
Click to hide internal directories.