Rename reporter.go to metrics.go

This commit is contained in:
Asim Aslam
2020-08-23 22:18:28 +01:00
committed by GitHub
parent cc26f2b8b1
commit 21004341bf

14
metrics/metrics.go Normal file
View File

@@ -0,0 +1,14 @@
// 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
// 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
}