Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/debugger/test_debugger_pii.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def _setup(self, *, line_probe: bool = False):

while not snapshot_found and retries < self._max_retries:
self.send_weblog_request("/debugger/pii", reset=(retries == 0))
self.wait_for_all_probes(statuses=["EMITTING"])
snapshot_found = self.wait_for_all_snapshots(timeout=timeout)
timeout = self._timeout_next
retries += 1
Expand All @@ -154,6 +155,13 @@ def _validate_pii_keyword_redaction(self, excluded_identifiers: list[str] | None
improperly_redacted = []
excluded_identifiers = excluded_identifiers if excluded_identifiers else []

missing = [pid for pid in self.probe_ids if pid not in self.probe_snapshots]
if missing:
raise AssertionError(
f"Expected snapshots for probes {missing} not found. "
f"Got snapshots for: {list(self.probe_snapshots.keys())}"
)

for probe_id in self.probe_ids:
base = self.probe_snapshots[probe_id][0]
snapshot = base.get("debugger", {}).get("snapshot") or base["debugger.snapshot"]
Expand Down
5 changes: 4 additions & 1 deletion tests/debugger/test_debugger_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ def _setup(self):

if not Test_Debugger_Telemetry.telemetry_data:
telemetry_type = "app-started"
timeout = 5

if self.get_tracer()["language"] == "dotnet":
telemetry_type = "app-client-configuration-change"
# Dotnet needs more time: RC fetch + apply + send app-client-configuration-change
timeout = 25

Test_Debugger_Telemetry.telemetry_data = self.wait_for_telemetry(telemetry_type)
Test_Debugger_Telemetry.telemetry_data = self.wait_for_telemetry(telemetry_type, timeout=timeout)

self.telemetry = Test_Debugger_Telemetry.telemetry_data

Expand Down
2 changes: 1 addition & 1 deletion utils/_context/_scenarios/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ class _Scenarios:
"DD_EXCEPTION_REPLAY_ENABLED": "1",
"DD_SYMBOL_DATABASE_UPLOAD_ENABLED": "1",
},
library_interface_timeout=5,
library_interface_timeout=20, # 20s: dotnet needs more time for RC + telemetry (reduced flakes)
doc="Test scenario for checking debugger telemetry.",
scenario_groups=[scenario_groups.debugger, scenario_groups.telemetry],
)
Expand Down
2 changes: 1 addition & 1 deletion utils/_context/_scenarios/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, name: str, doc: str, weblog_env: dict[str, str | None]) -> No
doc=doc,
rc_api_enabled=True,
rc_backend_enabled=True,
library_interface_timeout=5,
library_interface_timeout=15, # 15s: debugger snapshots can be slow (reduced flakes)
weblog_env=base_weblog_env,
scenario_groups=[scenario_groups.debugger],
)
Expand Down
Loading