diff --git a/tests/conftest.py b/tests/conftest.py index 312c992e6b..741aec1938 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1039,7 +1039,7 @@ def inner(events, method_name): return [ transaction for transaction in events - if transaction["type"] == "transaction" + if transaction.get("type") == "transaction" and any( span["data"].get("mcp.method.name") == method_name for span in transaction.get("spans", [])