func (r *Reporter) Int64(name, desc string, log logrus.FieldLogger, fields ...string) Int64 {
	current := make([]map[string][]int64, len(fields))
	for i := range fields {
		current[i] = make(map[string][]int64, 1)
	}
	out := &logInt64{
		name:    name,
		desc:    desc,
		log:     log,
		fields:  fields,
		current: current,
	}
	*r = append(*r, out)
	return out
}
Int64 configures a new Int64 metric to report.
package metrics
import (
	"context"
	"fmt"
	"strconv"
	"sync"
	"time"
	"bitbucket.org/creachadair/stringset"
	"github.com/sirupsen/logrus"
)
type Valuer interface {
	Metric
	Values() map[string]map[string]interface{}
}
type Reporter []Valuer
func (r *Reporter) Report(ctx context.Context, log logrus.FieldLogger, freq time.Duration) error {
	if log == nil {
		log = logrus.New()
	}
	ticker := time.NewTicker(freq)
	defer ticker.Stop()
	names := stringset.NewSize(len(*r))
	metricMap := make(map[string]int, len(*r))
	for i, m := range *r {
		name := m.Name()
		names.Add(name)
		metricMap[name] = i
	}
	for {
		select {
		case <-ticker.C:
		case <-ctx.Done():
			return ctx.Err()
		}
		for _, name := range names.Elements() {
			i := metricMap[name]
			metric := (*r)[i]
			log := log.WithField("metric", metric.Name())
			for field, values := range metric.Values() {
				log := log.WithField("field", field)
				for value, measurement := range values {
					log = log.WithField(value, measurement)
				}
				log.Info("Current status")
			}
		}
	}
}