diff --git a/api/chalicelib/core/metrics/product_analytics_ch.py b/api/chalicelib/core/metrics/product_analytics_ch.py index afd3e52d3..8425e7a77 100644 --- a/api/chalicelib/core/metrics/product_analytics_ch.py +++ b/api/chalicelib/core/metrics/product_analytics_ch.py @@ -488,11 +488,11 @@ SELECT * FROM pre_ranked_events;""" logger.debug("---------Q1-----------") ch_query1 = ch.format(query=ch_query1, parameters=params) - logger.debug(ch_query1) + logger.debug(ch_query1.encode('utf-8')) ch.execute(query=ch_query1) if time() - _now > 2: logger.warning(f">>>>>>>>>PathAnalysis long query EE ({int(time() - _now)}s)<<<<<<<<<") - logger.warning(ch_query1) + logger.warning(ch_query1.encode('utf-8')) logger.warning("----------------------") _now = time() @@ -515,10 +515,11 @@ FROM ranked_events {q2_extra_condition if q2_extra_condition else ""};""" logger.debug("---------Q2-----------") ch_query2 = ch.format(query=ch_query2, parameters=params) + logger.debug(ch_query2.encode('utf-8')) ch.execute(query=ch_query2) if time() - _now > 2: logger.warning(f">>>>>>>>>PathAnalysis long query EE ({int(time() - _now)}s)<<<<<<<<<") - logger.warning(ch_query2) + logger.warning(ch_query2.encode('utf-8')) logger.warning("----------------------") _now = time() @@ -629,11 +630,11 @@ FROM ranked_events ORDER BY event_number_in_session, sessions_count DESC;""" logger.debug("---------Q3-----------") ch_query3 = ch.format(query=ch_query3, parameters=params) - logger.debug(ch_query3) + logger.debug(ch_query3.encode('utf-8')) rows = ch.execute(query=ch_query3) if time() - _now > 2: logger.warning(f">>>>>>>>>PathAnalysis long query EE ({int(time() - _now)}s)<<<<<<<<<") - logger.warning(ch_query3) + logger.warning(ch_query3.encode('utf-8')) logger.warning("----------------------") return __transform_journey(rows=rows, reverse_path=reverse)