forked from nmaquet/kasper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetrics.go
24 lines (20 loc) · 783 Bytes
/
metrics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package kasper
// Counter is a single float metric that can be incremented by one or added to.
type Counter interface {
Inc(labelValues ...string)
Add(value float64, labelValues ...string)
}
// Gauge is a single float metric that can be set to a specific value.
type Gauge interface {
Set(value float64, labelValues ...string)
}
// Summary is a float value metric that provides a history of observations.
type Summary interface {
Observe(value float64, labelValues ...string)
}
// MetricsProvider is a facility to create metrics instances.
type MetricsProvider interface {
NewCounter(name string, help string, labelNames ...string) Counter
NewGauge(name string, help string, labelNames ...string) Gauge
NewSummary(name string, help string, labelNames ...string) Summary
}