:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(phai): tag Max insight query executions as posthog_ai source (#69288)
Georgiy Tarasov9e1eae8c417c
diff --git a/ee/hogai/context/insight/query_executor.py b/ee/hogai/context/insight/query_executor.pyindex 77f7f062d88a..98a84ff2e91b 100644--- a/ee/hogai/context/insight/query_executor.py+++ b/ee/hogai/context/insight/query_executor.py@@ -49,6 +49,7 @@ from posthog.api.services.query import process_query_dictfrom posthog.clickhouse.client.execute_async import get_query_statusfrom posthog.clickhouse.query_tagging import Feature, Product, get_query_tags, tag_queries, tags_contextfrom posthog.errors import ExposedCHQueryError+from posthog.event_usage import EventSourcefrom posthog.hogql_queries.query_runner import BLOCKING_EXECUTION_MODES, ExecutionModefrom posthog.models import Teamfrom posthog.rbac.user_access_control import UserAccessControlError@@ -342,6 +343,7 @@ class AssistantQueryExecutor:execution_mode=execution_mode,limit_context=LimitContext.POSTHOG_AI,user=user,+ analytics_props={"source": EventSource.POSTHOG_AI},)# If the query has a blocking execution, execute on a separate thread. Otherwise, use the main thread