micro/metrics/reporter.go
Vasiliy Tolstov a9eff06976
fix repocard issues (#2)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-02 13:25:29 +03:00

19 lines
451 B
Go

// Package metrics is for instrumentation and debugging
package metrics
import "time"
// Tags is a map of fields to add to a metric:
type Tags map[string]string
var (
DefaultReporter Reporter
)
// Reporter is an interface for collecting and instrumenting metrics
type Reporter interface {
Count(id string, value int64, tags Tags) error
Gauge(id string, value float64, tags Tags) error
Timing(id string, value time.Duration, tags Tags) error
}