Skip to content

Commit

Permalink
use the correct macro to conditional compile the trace_context code i…
Browse files Browse the repository at this point in the history
…n shim_main

Signed-off-by: jiaxiao zhou <[email protected]>
  • Loading branch information
Mossaka committed Jun 5, 2024
1 parent fa8671e commit e410de0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/containerd-shim-wasm/src/sandbox/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ pub fn shim_main<'a, I>(
I: 'static + Instance + Sync + Send,
I::Engine: Default,
{
if cfg!(feature = "opentelemetry") {
#[cfg(feature = "opentelemetry")]
{
// read TRACECONTEXT env var that's set by the parent process
if let Ok(ctx) = std::env::var("TRACECONTEXT") {
OtelConfig::set_trace_context(&ctx).unwrap();
Expand Down

0 comments on commit e410de0

Please sign in to comment.