diff --git a/exporter/sumologicexporter/config.go b/exporter/sumologicexporter/config.go index 568400ef74e7..16382c6942c7 100644 --- a/exporter/sumologicexporter/config.go +++ b/exporter/sumologicexporter/config.go @@ -62,9 +62,9 @@ type Config struct { // createDefaultClientConfig returns default http client settings func createDefaultClientConfig() confighttp.ClientConfig { - return confighttp.ClientConfig{ - Timeout: defaultTimeout, - } + config := confighttp.NewDefaultClientConfig() + config.Timeout = defaultTimeout + return config } // LogFormatType represents log_format diff --git a/exporter/sumologicexporter/factory_test.go b/exporter/sumologicexporter/factory_test.go index 906cd7d415e3..c37ad2e8ebb3 100644 --- a/exporter/sumologicexporter/factory_test.go +++ b/exporter/sumologicexporter/factory_test.go @@ -40,7 +40,9 @@ func TestCreateDefaultConfig(t *testing.T) { GraphiteTemplate: "%{_metric_}", ClientConfig: confighttp.ClientConfig{ - Timeout: 5 * time.Second, + IdleConnTimeout: confighttp.NewDefaultClientConfig().IdleConnTimeout, + MaxIdleConns: confighttp.NewDefaultClientConfig().MaxIdleConns, + Timeout: 5 * time.Second, }, BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: qs,