From a57add7e927d6af678802b16c1cc85fcdd192ce2 Mon Sep 17 00:00:00 2001 From: Kyle Mumma Date: Thu, 21 Mar 2024 16:43:47 -0700 Subject: [PATCH] readded logging and metrics --- .../processors/logical/filter_in_select_optimizer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/snuba/query/processors/logical/filter_in_select_optimizer.py b/snuba/query/processors/logical/filter_in_select_optimizer.py index 1d31d8fa8d5..eea32733cb2 100644 --- a/snuba/query/processors/logical/filter_in_select_optimizer.py +++ b/snuba/query/processors/logical/filter_in_select_optimizer.py @@ -89,8 +89,12 @@ def process_mql_query( new_condition = self.get_select_filter(query) if new_condition is not None: query.add_condition_to_ast(new_condition) - except ValueError: - raise + metrics.increment("kyles_optimizer_optimized") + except Exception: + logger.warning( + "Failed during optimization", exc_info=True, extra={"query": query} + ) + return def get_select_filter( self,