From 42faab997285ca89a846cc97156dedddb0f7f78c Mon Sep 17 00:00:00 2001 From: Igor Unanua Date: Wed, 20 Nov 2024 17:42:36 +0100 Subject: [PATCH] Check apm is disabled and dropping traces with no appsec events --- tests/appsec/test_asm_standalone.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/appsec/test_asm_standalone.py b/tests/appsec/test_asm_standalone.py index f42d2d9f92..0d854f4e53 100644 --- a/tests/appsec/test_asm_standalone.py +++ b/tests/appsec/test_asm_standalone.py @@ -698,9 +698,14 @@ def test_telemetry_sca_enabled_propagated(self): assert cfg_appsec_enabled.get("value") == outcome_value def setup_app_dependencies_loaded(self): - weblog.get("/load_dependency") + self.r = weblog.get("/load_dependency") def test_app_dependencies_loaded(self): + # test standalone is enabled and dropping traces + for data, _trace, span in interfaces.library.get_spans(request=self.r): + assert span["metrics"]["_sampling_priority_v1"] == 0 + assert span["metrics"]["_dd.apm.enabled"] == 0 + seen_loaded_dependencies = TelemetryUtils.get_loaded_dependency(context.library.library) for data in interfaces.library.get_telemetry_data():