diff --git a/pkg/output/http/config.go b/pkg/output/http/config.go index 335442c4..fb6a100e 100644 --- a/pkg/output/http/config.go +++ b/pkg/output/http/config.go @@ -13,7 +13,7 @@ type Config struct { ExportTimeout time.Duration `yaml:"exportTimeout" default:"30s"` MaxExportBatchSize int `yaml:"maxExportBatchSize" default:"512"` Compression CompressionStrategy `yaml:"compression" default:"none"` - KeepAlive bool `yaml:"keepAlive" default:"true"` + KeepAlive *bool `yaml:"keepAlive" default:"true"` } func (c *Config) Validate() error { diff --git a/pkg/output/http/exporter.go b/pkg/output/http/exporter.go index bfd6587f..49cbdd64 100644 --- a/pkg/output/http/exporter.go +++ b/pkg/output/http/exporter.go @@ -22,7 +22,7 @@ type ItemExporter struct { func NewItemExporter(name string, config *Config, log logrus.FieldLogger) (ItemExporter, error) { t := http.DefaultTransport.(*http.Transport).Clone() - if !config.KeepAlive { + if config.KeepAlive != nil && !*config.KeepAlive { t.DisableKeepAlives = true }