diff --git a/experimental/packages/otlp-grpc-exporter-base/src/grpc-exporter-transport.ts b/experimental/packages/otlp-grpc-exporter-base/src/grpc-exporter-transport.ts index 57be7e5e28..77038648ce 100644 --- a/experimental/packages/otlp-grpc-exporter-base/src/grpc-exporter-transport.ts +++ b/experimental/packages/otlp-grpc-exporter-base/src/grpc-exporter-transport.ts @@ -25,12 +25,7 @@ const GRPC_COMPRESSION_NONE = 0; const GRPC_COMPRESSION_GZIP = 2; function toGrpcCompression(compression: 'gzip' | 'none'): number { - if (compression === 'none') { - return GRPC_COMPRESSION_NONE; - } else if (compression === 'gzip') { - return GRPC_COMPRESSION_GZIP; - } - return GRPC_COMPRESSION_NONE; + return compression === 'gzip' ? GRPC_COMPRESSION_GZIP : GRPC_COMPRESSION_NONE; } export function createInsecureCredentials(): ChannelCredentials {