internal void Publish(Metric metric) { if (metric.Sample < 1 && metric.Sample < Sampler.NextDouble()) { return; } var payload = _metricSerializer.SerializeMetric(metric); _channel.Write(payload); }
public string SerializeMetric(object metric) { var serializer = new MetricSerializer(); var serializedMetric = serializer.SerializeMetric((Metric)metric); return(serializedMetric); }