From 778dd0820324a86dfa9212fd777b6279a587d81c Mon Sep 17 00:00:00 2001 From: masato Date: Thu, 14 Mar 2024 05:34:12 +0900 Subject: [PATCH] Fixed a problem that caused response errors when compression is enabled. --- opentelemetry-otlp/src/exporter/tonic/logs.rs | 4 +++- opentelemetry-otlp/src/exporter/tonic/metrics.rs | 4 +++- opentelemetry-otlp/src/exporter/tonic/trace.rs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/opentelemetry-otlp/src/exporter/tonic/logs.rs b/opentelemetry-otlp/src/exporter/tonic/logs.rs index 0d792bcfed..4b5a5787e3 100644 --- a/opentelemetry-otlp/src/exporter/tonic/logs.rs +++ b/opentelemetry-otlp/src/exporter/tonic/logs.rs @@ -33,7 +33,9 @@ impl TonicLogsClient { ) -> Self { let mut client = LogsServiceClient::new(channel); if let Some(compression) = compression { - client = client.send_compressed(compression); + client = client + .send_compressed(compression) + .accept_compressed(compression); } TonicLogsClient { diff --git a/opentelemetry-otlp/src/exporter/tonic/metrics.rs b/opentelemetry-otlp/src/exporter/tonic/metrics.rs index abcc42701d..97040d3201 100644 --- a/opentelemetry-otlp/src/exporter/tonic/metrics.rs +++ b/opentelemetry-otlp/src/exporter/tonic/metrics.rs @@ -35,7 +35,9 @@ impl TonicMetricsClient { ) -> Self { let mut client = MetricsServiceClient::new(channel); if let Some(compression) = compression { - client = client.send_compressed(compression); + client = client + .send_compressed(compression) + .accept_compressed(compression); } TonicMetricsClient { diff --git a/opentelemetry-otlp/src/exporter/tonic/trace.rs b/opentelemetry-otlp/src/exporter/tonic/trace.rs index 6b43c5e974..b328dfba5f 100644 --- a/opentelemetry-otlp/src/exporter/tonic/trace.rs +++ b/opentelemetry-otlp/src/exporter/tonic/trace.rs @@ -33,7 +33,9 @@ impl TonicTracesClient { ) -> Self { let mut client = TraceServiceClient::new(channel); if let Some(compression) = compression { - client = client.send_compressed(compression); + client = client + .send_compressed(compression) + .accept_compressed(compression); } TonicTracesClient {