public DatadogHttpClient(DatadogConfiguration config, LogFormatter formatter, string apiKey)
 {
     _config    = config;
     _client    = new HttpClient();
     _url       = $"{config.Url}/v1/input/{apiKey}";
     _formatter = formatter;
 }
 private void EnsureClient()
 {
     if (_client == null)
     {
         var configuration = new DatadogConfiguration(Url, Port, UseSSL, UseTCP);
         if (UseTCP)
         {
             _client = new DatadogTcpClient(configuration, new LogFormatter(Source, Service, Host, Tags.Split(',')), ApiKey);
         }
         else
         {
             _client = new DatadogHttpClient(configuration, new LogFormatter(Source, Service, Host, Tags != null ? Tags.Split(',') : null), ApiKey);
         }
     }
 }
 public DatadogTcpClient(DatadogConfiguration config, LogFormatter formatter, string apiKey)
 {
     _config    = config;
     _formatter = formatter;
     _apiKey    = apiKey;
 }