Skip to content

Commit

Permalink
fix: Tracing export over TLS
Browse files Browse the repository at this point in the history
Tonic changed defaults that broke "how things worked" with otel

open-telemetry/opentelemetry-rust#2008

Now be more explicit to enable the previous behavior
  • Loading branch information
philipcristiano committed Sep 19, 2024
1 parent 2707c63 commit 20dc743
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 20dc743

Please sign in to comment.