From ebb77fa1fb6f6148f994432fd10e0202aa5b6a9d Mon Sep 17 00:00:00 2001 From: Raj Nishtala Date: Wed, 16 Oct 2024 13:04:51 -0400 Subject: [PATCH] Change the default config for the otlphttpexporter to use TypeWithLevel for compression --- exporter/otlphttpexporter/factory.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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