From 20dc743e6f907b58eb5d40fc5780674821eddd16 Mon Sep 17 00:00:00 2001 From: Philip Cristiano Date: Thu, 19 Sep 2024 19:56:58 -0400 Subject: [PATCH] fix: Tracing export over TLS Tonic changed defaults that broke "how things worked" with otel https://github.com/open-telemetry/opentelemetry-rust/issues/2008 Now be more explicit to enable the previous behavior --- src/tracing.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tracing.rs b/src/tracing.rs index bed1473..5ac7a4a 100644 --- a/src/tracing.rs +++ b/src/tracing.rs @@ -32,7 +32,9 @@ fn init_tracer() -> Tracer { use opentelemetry::trace::TracerProvider as _; use opentelemetry_otlp::TonicExporterBuilder; use opentelemetry_sdk::trace::TracerProvider; + let tls_config = tonic::transport::ClientTlsConfig::new().with_native_roots(); let exporter = TonicExporterBuilder::default() + .with_tls_config(tls_config) .build_span_exporter() .expect("Init"); let provider = TracerProvider::builder()