Skip to content

Commit a2aacad

Browse files
fix: OTLP exporter compression should be none by default. fixes #1798.
1 parent aacd8c8 commit a2aacad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

exporter/otlp/lib/opentelemetry/exporter/otlp/exporter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def initialize(endpoint: nil,
5151
client_key_file: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY', 'OTEL_EXPORTER_OTLP_CLIENT_KEY'),
5252
ssl_verify_mode: Exporter.ssl_verify_mode,
5353
headers: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_HEADERS', 'OTEL_EXPORTER_OTLP_HEADERS', default: {}),
54-
compression: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_COMPRESSION', 'OTEL_EXPORTER_OTLP_COMPRESSION', default: 'gzip'),
54+
compression: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_COMPRESSION', 'OTEL_EXPORTER_OTLP_COMPRESSION'),
5555
timeout: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_TIMEOUT', 'OTEL_EXPORTER_OTLP_TIMEOUT', default: 10),
5656
metrics_reporter: nil)
5757
@uri = prepare_endpoint(endpoint)

exporter/otlp/test/opentelemetry/exporter/otlp/exporter_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
_(exp.instance_variable_get(:@headers)).must_equal('User-Agent' => DEFAULT_USER_AGENT)
2727
_(exp.instance_variable_get(:@timeout)).must_equal 10.0
2828
_(exp.instance_variable_get(:@path)).must_equal '/v1/traces'
29-
_(exp.instance_variable_get(:@compression)).must_equal 'gzip'
29+
_(exp.instance_variable_get(:@compression)).must_be_nil
3030
http = exp.instance_variable_get(:@http)
3131
_(http.ca_file).must_be_nil
3232
_(http.cert).must_be_nil
@@ -385,7 +385,7 @@
385385
end
386386

387387
describe '#export' do
388-
let(:exporter) { OpenTelemetry::Exporter::OTLP::Exporter.new }
388+
let(:exporter) { OpenTelemetry::Exporter::OTLP::Exporter.new compression: 'gzip' }
389389

390390
before do
391391
OpenTelemetry.tracer_provider = OpenTelemetry::SDK::Trace::TracerProvider.new(resource: OpenTelemetry::SDK::Resources::Resource.telemetry_sdk)

0 commit comments

Comments
 (0)