Skip to content

Commit fa428db

Browse files
committed
Turn off DD_ENHANCED_METRICS in Windows for now to prevent metrics collector from initializing and logging that metrics collection is being skipped
1 parent b4a7624 commit fa428db

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

crates/datadog-metrics-collector/src/windows.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
//! All CPU metrics are reported in nanocores (1 core = 1,000,000,000 nanocores).
1010
1111
use crate::cpu::{CpuStats, CpuStatsReader};
12-
use tracing::debug;
1312

1413
pub struct WindowsCpuStatsReader;
1514

1615
impl CpuStatsReader for WindowsCpuStatsReader {
1716
fn read(&self) -> Option<CpuStats> {
18-
debug!("CPU enhanced metrics are not yet supported on Windows Azure Functions");
1917
None
2018
}
2119
}

crates/datadog-serverless-compat/src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,17 @@ pub async fn main() {
107107
.ok()
108108
.and_then(|val| parse_metric_namespace(&val));
109109

110-
// Only enable enhanced metrics for Azure Functions
110+
// Only enable enhanced metrics for Linux Azure Functions
111+
#[cfg(not(feature = "windows-enhanced-metrics"))]
111112
let dd_enhanced_metrics = env_type == EnvironmentType::AzureFunction
112113
&& env::var("DD_ENHANCED_METRICS_ENABLED")
113114
.map(|val| val.to_lowercase() != "false")
114115
.unwrap_or(true);
115116

117+
// Enhanced metrics are not yet supported in Windows environments
118+
#[cfg(feature = "windows-enhanced-metrics")]
119+
let dd_enhanced_metrics = false;
120+
116121
let https_proxy = env::var("DD_PROXY_HTTPS")
117122
.or_else(|_| env::var("HTTPS_PROXY"))
118123
.ok();

0 commit comments

Comments
 (0)