internal void SetCounter(Metric metric, long value) { if (!IsEnabled) return; lock (metricsLock) { Counters[metric] = value; } } /// <summary>