: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
chore(endpoints): report is_materialized on 'endpoint executed' (#65177)
Jovan Sakovicdc8fa8bf9e41
diff --git a/products/endpoints/backend/services/execution.py b/products/endpoints/backend/services/execution.pyindex 90dd02d4741c..55e682381620 100644--- a/products/endpoints/backend/services/execution.py+++ b/products/endpoints/backend/services/execution.py@@ -448,12 +448,15 @@ class EndpointExecutionService(PydanticModelMixin):self.log_rejected_run(endpoint, self.format_validation_detail(exc.detail))raise+ use_materialized = self.should_use_materialized_table(endpoint, data, version_obj)+report_user_action(cast("User | SyntheticUser", self.request.user),"endpoint executed",{"endpoint_id": str(endpoint.id),"endpoint_name": endpoint.name,+ "is_materialized": use_materialized,"has_filters_override": bool(data.filters_override),"has_variables": bool(data.variables),"has_limit": data.limit is not None,@@ -467,9 +470,6 @@ class EndpointExecutionService(PydanticModelMixin):analytics_props=get_request_analytics_properties(self.request),)- # Check if we should use materialization for this version- use_materialized = self.should_use_materialized_table(endpoint, data, version_obj)-debug = data.debug or Falseexecution_type: ExecutionType = "materialized" if use_materialized else "inline"query_kind_metric = query_kind_label(version_obj.query)