diff --git a/crates/openshell-server/src/tracing_setup.rs b/crates/openshell-server/src/tracing_setup.rs index c5b8d9f4a..968a1c6a0 100644 --- a/crates/openshell-server/src/tracing_setup.rs +++ b/crates/openshell-server/src/tracing_setup.rs @@ -38,16 +38,16 @@ impl TracingHandle { #[derive(Debug, Clone, Copy, PartialEq, Eq)] enum InProcessDriverTracing { - #[cfg(feature = "in-tree-compute-drivers")] + #[cfg(all(not(target_os = "windows"), feature = "in-tree-compute-drivers"))] Docker, - #[cfg(feature = "in-tree-compute-drivers")] + #[cfg(all(not(target_os = "windows"), feature = "in-tree-compute-drivers"))] Kubernetes, - #[cfg(feature = "in-tree-compute-drivers")] + #[cfg(all(not(target_os = "windows"), feature = "in-tree-compute-drivers"))] Podman, } impl InProcessDriverTracing { - #[cfg(feature = "in-tree-compute-drivers")] + #[cfg(all(not(target_os = "windows"), feature = "in-tree-compute-drivers"))] fn target_prefix(self) -> &'static str { match self { Self::Docker => openshell_driver_docker::otel_tracing::IN_PROCESS_TARGET_PREFIX, @@ -58,7 +58,7 @@ impl InProcessDriverTracing { } fn in_process_driver_tracing(driver: &ConfiguredComputeDriver) -> Option { - #[cfg(feature = "in-tree-compute-drivers")] + #[cfg(all(not(target_os = "windows"), feature = "in-tree-compute-drivers"))] match driver { ConfiguredComputeDriver::Registered(registration) if registration.name == "docker" => { Some(InProcessDriverTracing::Docker) @@ -71,7 +71,7 @@ fn in_process_driver_tracing(driver: &ConfiguredComputeDriver) -> Option None, } - #[cfg(not(feature = "in-tree-compute-drivers"))] + #[cfg(not(all(not(target_os = "windows"), feature = "in-tree-compute-drivers")))] { let _ = driver; None @@ -79,18 +79,18 @@ fn in_process_driver_tracing(driver: &ConfiguredComputeDriver) -> Option) -> Option<&'static str> { - #[cfg(feature = "in-tree-compute-drivers")] + #[cfg(all(not(target_os = "windows"), feature = "in-tree-compute-drivers"))] { driver.map(InProcessDriverTracing::target_prefix) } - #[cfg(not(feature = "in-tree-compute-drivers"))] + #[cfg(not(all(not(target_os = "windows"), feature = "in-tree-compute-drivers")))] { let _ = driver; None } } -#[cfg(feature = "in-tree-compute-drivers")] +#[cfg(all(not(target_os = "windows"), feature = "in-tree-compute-drivers"))] fn in_process_driver_provider( driver: Option, endpoint: Option<&str>, @@ -109,7 +109,7 @@ fn in_process_driver_provider( } } -#[cfg(not(feature = "in-tree-compute-drivers"))] +#[cfg(not(all(not(target_os = "windows"), feature = "in-tree-compute-drivers")))] fn in_process_driver_provider( _driver: Option, _endpoint: Option<&str>, @@ -117,7 +117,7 @@ fn in_process_driver_provider( (None, None) } -#[cfg(feature = "in-tree-compute-drivers")] +#[cfg(all(not(target_os = "windows"), feature = "in-tree-compute-drivers"))] fn in_process_driver_layer( provider: &Option, driver: Option, @@ -139,7 +139,7 @@ where }) } -#[cfg(not(feature = "in-tree-compute-drivers"))] +#[cfg(not(all(not(target_os = "windows"), feature = "in-tree-compute-drivers")))] fn in_process_driver_layer( _provider: &Option, _driver: Option,