1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
import "    influxdb "github.com/vrischmann/go-metrics-influxdb""
    go influxdb.InfluxDB(
        metrics.DefaultRegistry,
        time.Duration(10)*time.Second,
        "http://192.168.50.244:8086",
        "database0",
        "measurement0",
        "",
        "",
        false,
    )

    go metrics.Log(
        metrics.DefaultRegistry,
        time.Duration(metricsOutputDuration)*time.Second,
        logger.GetLogger(),
    )

meter := metrics.GetOrRegisterMeter("foo", nil)
meter.Mark(1)