public static IDisposable Gauge(
            this IMetricScope scope,
            TimeSpan period,
            string name,
            Func <double> getValue)
        {
            var clock = MetricClocks.Get(period);

            return(new DisposableMetric(
                       clock,
                       timestamp =>
            {
                var value = getValue();
                SendMetricToScope(scope, name, timestamp, value);
            }));
        }
        public static ICounter Counter(
            this IMetricScope scope,
            TimeSpan period,
            string name)
        {
            var counter = new Counter();
            var clock   = MetricClocks.Get(period);

            return(new DisposableCounter(
                       counter,
                       clock,
                       timestamp =>
            {
                var value = counter.Reset();
                SendMetricToScope(scope, name, timestamp, value);
            }));
        }