From 49980631a85750289b5664a56c0e2513ae6f30f7 Mon Sep 17 00:00:00 2001 From: Lyn Nagara <1779792+lynnagara@users.noreply.github.com> Date: Wed, 16 Oct 2024 09:42:46 -0700 Subject: [PATCH] fix: fix io main thread detector (#79165) fixes SENTRY-FOR-SENTRY-343Q --- .../performance_issues/detectors/io_main_thread_detector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sentry/utils/performance_issues/detectors/io_main_thread_detector.py b/src/sentry/utils/performance_issues/detectors/io_main_thread_detector.py index 5755e56109f948..b4919bf0a144e4 100644 --- a/src/sentry/utils/performance_issues/detectors/io_main_thread_detector.py +++ b/src/sentry/utils/performance_issues/detectors/io_main_thread_detector.py @@ -193,7 +193,8 @@ def _is_io_on_main_thread(self, span: Span) -> bool: data = span.get("data", {}) if data is None: return False - file_path = data.get("file.path", "").lower() + file_path = (data.get("file.path") or "").lower() + if any(glob_match(file_path, ignored_pattern) for ignored_pattern in self.IGNORED_LIST): return False # doing is True since the value can be any type