From c762e17619dc9ff0a2dabe6237dd2420dfc0cad5 Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Thu, 22 Feb 2024 16:27:26 +0100 Subject: [PATCH] feat: apply compression suggestion --- .../otlp-grpc-exporter-base/src/grpc-exporter-transport.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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 {