diff --git a/utils/interfaces/_test_agent.py b/utils/interfaces/_test_agent.py index d67bbc6c918..08900be003a 100644 --- a/utils/interfaces/_test_agent.py +++ b/utils/interfaces/_test_agent.py @@ -117,6 +117,19 @@ def get_crash_reports(self): ): crash_reports.append(payload) + # v2 logs send in the form of `payload:{logs:[]}` + # we should also check if `logs` value is a list, and iterate + # through the `dict`s in the list + if "logs" in payload and isinstance(payload["logs"], list): + for log in payload["logs"]: + if isinstance(log, dict): + if ( + "si_signo" in log.get("tags", "") + or "signame" in log.get("tags", "") + or "signum" in log.get("tags", "") + ): + crash_reports.append(log) + return crash_reports def get_telemetry_configurations(self, service_name: str | None = None, runtime_id: str | None = None) -> dict: