From a605ce297a706731734eabe35cef728c571307e8 Mon Sep 17 00:00:00 2001 From: Daniel Romano Date: Thu, 20 Aug 2026 00:39:23 +0200 Subject: [PATCH] debugger: scrub API Security schema tags from exception replay span approvals API Security samples schemas per (route, method, status) within a time window (30s by default), the same order as the test's own retry interval, so whether a given request carries `_dd.appsec.s.*` is not deterministic. Remove those keys like the `_dd.appsec.fp.*` fingerprints already are. --- tests/debugger/test_debugger_exception_replay.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/debugger/test_debugger_exception_replay.py b/tests/debugger/test_debugger_exception_replay.py index 52021532a3b..c77eee68bdf 100644 --- a/tests/debugger/test_debugger_exception_replay.py +++ b/tests/debugger/test_debugger_exception_replay.py @@ -374,7 +374,11 @@ def __scrub( keys_to_remove = [] span_meta = get_span_meta(span, span_format) for meta_key, meta_value in span_meta.items(): - if meta_key in { + if meta_key.startswith("_dd.appsec.s."): + # API Security samples schemas per (route, method, status) on a time window, so + # which request of the test carries them is not deterministic + keys_to_remove.append(meta_key) + elif meta_key in { "_dd.appsec.fp.http.endpoint", "_dd.appsec.fp.http.header", "_dd.appsec.fp.http.network",