private void SendMetric(string metricName, int value)
 {
     if (_optionalTransport != null)
     {
         var message = Statsd.Metric.GetCommand <Statsd.Counting, int>(
             string.Empty,
             metricName,
             value,
             1.0,
             _optionalTags);
         var bytes = BufferBuilder.GetBytes(message);
         _optionalTransport.Send(bytes, bytes.Length);
     }
 }
 private void SendMetric(string metricName, int value)
 {
     if (_optionalTransport != null && _optionalMetricSerializer != null)
     {
         var serializedMetric = new SerializedMetric();
         var metricStats      = new StatsMetric
         {
             MetricType   = MetricType.Count,
             StatName     = metricName,
             NumericValue = value,
             SampleRate   = 1.0,
             Tags         = _optionalTags,
         };
         _optionalMetricSerializer.SerializeTo(ref metricStats, serializedMetric);
         var bytes = BufferBuilder.GetBytes(serializedMetric.ToString());
         _optionalTransport.Send(bytes, bytes.Length);
     }
 }