From 05988920bc88f80827bbdc1506458cec812c2d63 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Mon, 16 Oct 2023 22:49:46 +0200 Subject: [PATCH] chore: really capture console log search errors to Sentry (#18015) --- .../__snapshots__/test_dashboard.ambr | 185 +++++++++++------- .../__snapshots__/test_notebook.ambr | 15 +- ...sion_recording_list_from_replay_summary.py | 14 +- .../session_recording_api.py | 12 +- .../test_session_recordings.ambr | 55 +++--- 5 files changed, 168 insertions(+), 113 deletions(-) diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr index 46aa59e783c44..51a2d1a06857d 100644 --- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr +++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr @@ -210,12 +210,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ @@ -233,12 +234,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ @@ -317,12 +319,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features", "posthog_user"."id", "posthog_user"."password", "posthog_user"."last_login", @@ -414,12 +417,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -682,12 +686,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_dashboard" INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id") @@ -1013,12 +1018,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_dashboard" INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id") @@ -1305,12 +1311,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -1661,12 +1668,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -1969,12 +1977,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -2367,12 +2376,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -2390,12 +2400,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -2482,12 +2493,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features", "posthog_user"."id", "posthog_user"."password", "posthog_user"."last_login", @@ -3478,12 +3490,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -3878,12 +3891,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -3931,12 +3945,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -4423,12 +4438,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -4622,12 +4638,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -4974,12 +4991,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -5003,12 +5021,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -5914,12 +5933,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -6277,12 +6297,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ @@ -6300,12 +6321,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ @@ -6384,12 +6406,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features", "posthog_user"."id", "posthog_user"."password", "posthog_user"."last_login", @@ -6720,12 +6743,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_dashboard" INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id") @@ -7096,12 +7120,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_dashboard" INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id") INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id") @@ -7256,12 +7281,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -8318,12 +8344,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -8900,12 +8927,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -9285,12 +9313,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/ @@ -9628,12 +9657,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ @@ -9662,12 +9692,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_dashboards-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/%3F%24'*/ @@ -9746,12 +9777,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features", "posthog_user"."id", "posthog_user"."password", "posthog_user"."last_login", @@ -10332,12 +10364,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -10366,12 +10399,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -10421,12 +10455,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -10762,12 +10797,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -10785,12 +10821,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ @@ -10888,12 +10925,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features", "posthog_user"."id", "posthog_user"."password", "posthog_user"."last_login", @@ -10990,12 +11028,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 /*controller='project_dashboards-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/dashboards/%3F%24'*/ diff --git a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr index 215eb5a8399d9..31f6729e6e9a7 100644 --- a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr +++ b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr @@ -338,12 +338,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_notebooks-all-activity',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/activity/%3F%24'*/ @@ -386,12 +387,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_notebooks-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%3F%24'*/ @@ -543,12 +545,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_notebooks-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%28%3FP%3Cshort_id%3E%5B%5E/.%5D%2B%29/%3F%24'*/ diff --git a/posthog/session_recordings/queries/session_recording_list_from_replay_summary.py b/posthog/session_recordings/queries/session_recording_list_from_replay_summary.py index fc20ebcc3866c..cfd07049abe55 100644 --- a/posthog/session_recordings/queries/session_recording_list_from_replay_summary.py +++ b/posthog/session_recordings/queries/session_recording_list_from_replay_summary.py @@ -3,6 +3,8 @@ from datetime import datetime, timedelta from typing import Any, Dict, List, Literal, NamedTuple, Tuple, Union +from sentry_sdk import capture_exception + from posthog.client import sync_execute from posthog.constants import TREND_FILTER_TYPE_ACTIONS, PropertyOperatorType from posthog.models import Entity, Team @@ -588,9 +590,15 @@ def get_query(self) -> Tuple[str, Dict[str, Any]]: recording_filters=self._filter ) - log_matching_session_ids_clause, log_matching_session_ids_params = _get_filter_by_log_text_session_ids_clause( - team=self._team, recording_filters=self._filter - ) + try: + ( + log_matching_session_ids_clause, + log_matching_session_ids_params, + ) = _get_filter_by_log_text_session_ids_clause(team=self._team, recording_filters=self._filter) + except Exception as ex: + # error here weren't making it to sentry, let's be explicit + capture_exception(ex, tags={"team_id": self._team.pk}) + raise ex duration_clause, duration_params = self.duration_clause(self._filter.duration_type_filter) console_log_clause = self._get_console_log_clause(self._filter.console_logs_filter) diff --git a/posthog/session_recordings/session_recording_api.py b/posthog/session_recordings/session_recording_api.py index 3b7932fd19ee7..827703006340c 100644 --- a/posthog/session_recordings/session_recording_api.py +++ b/posthog/session_recordings/session_recording_api.py @@ -15,7 +15,6 @@ from rest_framework.decorators import action from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response -from sentry_sdk import capture_exception from posthog.api.person import PersonSerializer from posthog.api.routing import StructuredViewSetMixin @@ -164,14 +163,9 @@ def get_object(self) -> SessionRecording: return recording def list(self, request: request.Request, *args: Any, **kwargs: Any) -> Response: - try: - filter = SessionRecordingsFilter(request=request, team=self.team) - recordings = list_recordings(filter, request, context=self.get_serializer_context()) - return Response(recordings) - except Exception as ex: - # error here weren't making it to sentry, let's be explicit - capture_exception(ex, tags={"team_id": self.team.pk}) - raise ex + filter = SessionRecordingsFilter(request=request, team=self.team) + recordings = list_recordings(filter, request, context=self.get_serializer_context()) + return Response(recordings) @extend_schema( description=""" diff --git a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr index 6132a8cfcb66d..37fec24061764 100644 --- a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr +++ b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr @@ -319,12 +319,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -689,12 +690,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -1058,12 +1060,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -1491,12 +1494,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -1890,12 +1894,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -1919,12 +1924,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -2160,12 +2166,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -2498,12 +2505,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -2860,12 +2868,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -3224,12 +3233,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/ @@ -3590,12 +3600,13 @@ "posthog_organization"."is_member_join_email_enabled", "posthog_organization"."enforce_2fa", "posthog_organization"."customer_id", - "posthog_organization"."available_features", "posthog_organization"."available_product_features", "posthog_organization"."usage", + "posthog_organization"."never_drop_data", "posthog_organization"."setup_section_2_completed", "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" + "posthog_organization"."domain_whitelist", + "posthog_organization"."available_features" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_session_recordings-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/session_recordings/%3F%24'*/