lib/opentelemetry/exporter/otlp/exporter.rb in opentelemetry-exporter-otlp-0.21.0 vs lib/opentelemetry/exporter/otlp/exporter.rb in opentelemetry-exporter-otlp-0.21.1
- old
+ new
@@ -50,10 +50,10 @@
headers: config_opt('OTEL_EXPORTER_OTLP_TRACES_HEADERS', 'OTEL_EXPORTER_OTLP_HEADERS', default: {}),
compression: config_opt('OTEL_EXPORTER_OTLP_TRACES_COMPRESSION', 'OTEL_EXPORTER_OTLP_COMPRESSION', default: 'gzip'),
timeout: config_opt('OTEL_EXPORTER_OTLP_TRACES_TIMEOUT', 'OTEL_EXPORTER_OTLP_TIMEOUT', default: 10),
metrics_reporter: nil)
raise ArgumentError, "invalid url for OTLP::Exporter #{endpoint}" if invalid_url?(endpoint)
- raise ArgumentError, "unsupported compression key #{compression}" unless compression.nil? || compression == 'gzip'
+ raise ArgumentError, "unsupported compression key #{compression}" unless compression.nil? || %w[gzip none].include?(compression)
@uri = if endpoint == ENV['OTEL_EXPORTER_OTLP_ENDPOINT']
URI("#{endpoint}/v1/traces")
else
URI(endpoint)