The _map_compression helper in the declarative config layer only maps gzip and none, but the HTTP OTLP exporter's Compression enum also supports Deflate. Passing compression: deflate in a config file will raise a ConfigurationError even though the HTTP exporter supports it.
This affects all provider configs that use HTTP OTLP exporters:
Note: gRPC does not support deflate, so the fix needs to be HTTP-specific — either by checking whether Deflate exists on the passed enum, or by splitting _map_compression into HTTP and gRPC variants.
Raised in: #4990 (comment)
The
_map_compressionhelper in the declarative config layer only mapsgzipandnone, but the HTTP OTLP exporter'sCompressionenum also supportsDeflate. Passingcompression: deflatein a config file will raise aConfigurationErroreven though the HTTP exporter supports it.This affects all provider configs that use HTTP OTLP exporters:
_tracer_provider.py(feat(config): Add TracerProvider support for declarative config #4985)_meter_provider.py(feat(config): Add MeterProvider support for declarative config #4987)_logger_provider.py(feat(config): Add LoggerProvider support for declarative config #4990)Note: gRPC does not support deflate, so the fix needs to be HTTP-specific — either by checking whether
Deflateexists on the passed enum, or by splitting_map_compressioninto HTTP and gRPC variants.Raised in: #4990 (comment)