Skip to content

Commit

Permalink
fix: tracing init
Browse files Browse the repository at this point in the history
  • Loading branch information
TroyKomodo committed May 5, 2024
1 parent 86c3a23 commit d5a6822
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion foundations/src/telemetry/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,12 @@ pub async fn init(info: crate::ServiceInfo, settings: TelemetrySettings) {

use tracing_subscriber::prelude::*;

tracing_subscriber::registry().with(logging).with(opentelemetry).init();
let registry = tracing_subscriber::registry();
#[cfg(feature = "opentelemetry")]
let registry = registry.with(opentelemetry);
#[cfg(feature = "logging")]
let registry = registry.with(logging);
registry.init();
}

#[cfg(all(
Expand Down

0 comments on commit d5a6822

Please sign in to comment.