public void Gauge(string name, long value, params Tag[] tags) { var newName = MetricNames.Format(name, tags); gauges.AddOrUpdate(newName, 0, (c, d) => value); }
public void Timer(string name, TimeSpan duration, params Tag[] tags) { var newName = MetricNames.Format(name, tags); timers.AddOrUpdate(newName, TimeSpan.FromSeconds(0), (c, d) => d + duration); }
public void Counter(string name, long delta, params Tag[] tags) { var newName = MetricNames.Format(name, tags); counters.AddOrUpdate(newName, 0, (c, d) => d + delta); }