Skip to content

Commit

Permalink
fix: otel 0.27 tls_config setting
Browse files Browse the repository at this point in the history
Need a trait to access this now

So import it
  • Loading branch information
philipcristiano committed Dec 1, 2024
1 parent 3faca1b commit 9649f36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use tracing_subscriber::registry;
use opentelemetry_sdk::trace::Tracer;
use tracing_opentelemetry::OpenTelemetryLayer;

use opentelemetry_otlp::TonicExporterBuilder;
use opentelemetry_otlp::WithTonicConfig;
use tracing_subscriber::prelude::__tracing_subscriber_SubscriberExt;

pub fn setup(level: Level) {
Expand All @@ -30,7 +32,6 @@ pub fn setup(level: Level) {
// Construct Tracer for OpenTelemetryLayer
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()
Expand Down

0 comments on commit 9649f36

Please sign in to comment.