Skip to content

Commit 71f359f

Browse files
link04claude
andcommitted
Fix parametric otel_metrics tests leaking runtime metrics
Add DD_RUNTIME_METRICS_ENABLED=false to DEFAULT_ENVVARS to prevent System.Runtime and Microsoft.AspNetCore.* metrics from polluting custom metric test assertions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8ebb5aa commit 71f359f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tests/parametric/test_otel_metrics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
# CORECLR_ENABLE_PROFILING=1 is required in .NET to enable auto-instrumentation
4444
DEFAULT_ENVVARS = {
4545
"DD_METRICS_OTEL_ENABLED": "true",
46+
"DD_RUNTIME_METRICS_ENABLED": "false", # Prevent runtime metrics (System.Runtime, Microsoft.AspNetCore.*) from leaking into custom metric tests
4647
"OTEL_METRIC_EXPORT_INTERVAL": "60000", # Mitigate test flake by increasing the interval so that the only time new metrics are exported are when we manually flush them
4748
"CORECLR_ENABLE_PROFILING": "1",
4849
}

0 commit comments

Comments
 (0)