diff --git a/exporter/otlphttpexporter/factory.go b/exporter/otlphttpexporter/factory.go index 78940cbfb42..31fd2ad8911 100644 --- a/exporter/otlphttpexporter/factory.go +++ b/exporter/otlphttpexporter/factory.go @@ -4,6 +4,7 @@ package otlphttpexporter // import "go.opentelemetry.io/collector/exporter/otlphttpexporter" import ( + "compress/gzip" "context" "fmt" "net/url" @@ -35,7 +36,7 @@ func createDefaultConfig() component.Config { clientConfig := confighttp.NewDefaultClientConfig() clientConfig.Timeout = 30 * time.Second // Default to gzip compression - clientConfig.Compression = configcompression.TypeGzip + clientConfig.Compression = configcompression.TypeWithLevel{Type: configcompression.TypeGzip, Level: gzip.DefaultCompression} // We almost read 0 bytes, so no need to tune ReadBufferSize. clientConfig.WriteBufferSize = 512 * 1024