public void OnNewValue(string metric) { if (!_bufferBuilder.Add(metric)) { throw new InvalidOperationException($"The metric size exceeds the buffer capacity: {metric}"); } _stopwatch = null; }
public void OnNewValue(SerializedMetric serializedMetric) { using (serializedMetric) { if (!_bufferBuilder.Add(serializedMetric)) { throw new InvalidOperationException($"The metric size exceeds the buffer capacity: {serializedMetric.ToString()}"); } _stopwatch = null; } }