From a8eccd42c6c9fa0175bc96c51ad70630eb064cab Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Wed, 24 Apr 2024 09:45:25 +0100 Subject: [PATCH] revert: "feat: mobile replay in usage" (#21789) --- .../test/__snapshots__/test_usage_report.ambr | 146 ++++++--------- posthog/tasks/test/test_usage_report.py | 173 ++++++------------ posthog/tasks/usage_report.py | 44 +---- 3 files changed, 112 insertions(+), 251 deletions(-) diff --git a/posthog/tasks/test/__snapshots__/test_usage_report.ambr b/posthog/tasks/test/__snapshots__/test_usage_report.ambr index 3ea0f701860bc..81a832aad0398 100644 --- a/posthog/tasks/test/__snapshots__/test_usage_report.ambr +++ b/posthog/tasks/test/__snapshots__/test_usage_report.ambr @@ -25,32 +25,6 @@ # name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.10 ''' - SELECT distinct_id as team, - sum(JSONExtractInt(properties, 'count')) as sum - FROM events - WHERE team_id = 2 - AND event='decide usage' - AND timestamp between '2022-01-01 00:00:00' AND '2022-01-10 23:59:59' - AND has(['correct'], replaceRegexpAll(JSONExtractRaw(properties, 'token'), '^"|"$', '')) - GROUP BY team - ''' -# --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.11 - ''' - - SELECT distinct_id as team, - sum(JSONExtractInt(properties, 'count')) as sum - FROM events - WHERE team_id = 2 - AND event='local evaluation usage' - AND timestamp between '2022-01-10 00:00:00' AND '2022-01-10 23:59:59' - AND has(['correct'], replaceRegexpAll(JSONExtractRaw(properties, 'token'), '^"|"$', '')) - GROUP BY team - ''' -# --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.12 - ''' - SELECT distinct_id as team, sum(JSONExtractInt(properties, 'count')) as sum FROM events @@ -61,7 +35,7 @@ GROUP BY team ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.13 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.11 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -78,7 +52,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.14 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.12 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -95,7 +69,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.15 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.13 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -112,7 +86,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.16 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.14 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -129,7 +103,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.17 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.15 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -146,7 +120,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.18 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.16 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -163,7 +137,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.19 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.17 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -180,22 +154,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.2 - ''' - - SELECT team_id, - count(distinct toDate(timestamp), event, cityHash64(distinct_id), cityHash64(uuid)) as count - FROM events - WHERE timestamp between '2022-01-10 00:00:00' AND '2022-01-10 23:59:59' - AND event != '$feature_flag_called' - AND event NOT IN ('survey sent', - 'survey shown', - 'survey dismissed') - AND person_mode = 'full' - GROUP BY team_id - ''' -# --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.20 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.18 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -212,7 +171,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.21 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.19 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -229,7 +188,22 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.22 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.2 + ''' + + SELECT team_id, + count(distinct toDate(timestamp), event, cityHash64(distinct_id), cityHash64(uuid)) as count + FROM events + WHERE timestamp between '2022-01-10 00:00:00' AND '2022-01-10 23:59:59' + AND event != '$feature_flag_called' + AND event NOT IN ('survey sent', + 'survey shown', + 'survey dismissed') + AND person_mode = 'full' + GROUP BY team_id + ''' +# --- +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.20 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -246,7 +220,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.23 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.21 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -263,7 +237,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.24 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.22 ''' WITH JSONExtractInt(log_comment, 'team_id') as team_id, JSONExtractString(log_comment, 'query_type') as query_type, @@ -280,7 +254,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.25 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.23 ''' SELECT team_id, @@ -291,7 +265,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.26 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.24 ''' SELECT team_id, @@ -302,7 +276,7 @@ GROUP BY team_id ''' # --- -# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.27 +# name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.25 ''' SELECT team, @@ -354,14 +328,9 @@ SELECT team_id, count(distinct session_id) as count - FROM - (SELECT any(team_id) as team_id, - session_id - FROM session_replay_events - WHERE min_first_timestamp BETWEEN '2022-01-10 00:00:00' AND '2022-01-10 23:59:59' - GROUP BY session_id - HAVING ifNull(argMinMerge(snapshot_source), 'web') == 'web') - WHERE session_id NOT IN + FROM session_replay_events + WHERE min_first_timestamp BETWEEN '2022-01-10 00:00:00' AND '2022-01-10 23:59:59' + AND session_id NOT IN (SELECT DISTINCT session_id FROM session_replay_events WHERE min_first_timestamp BETWEEN '2022-01-09 00:00:00' AND '2022-01-10 00:00:00' @@ -374,47 +343,34 @@ SELECT team_id, count(distinct session_id) as count - FROM - (SELECT any(team_id) as team_id, - session_id - FROM session_replay_events - GROUP BY session_id - HAVING ifNull(argMinMerge(snapshot_source), 'web') == 'web') + FROM session_replay_events GROUP BY team_id ''' # --- # name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.7 ''' - SELECT team_id, - count(distinct session_id) as count - FROM - (SELECT any(team_id) as team_id, - session_id - FROM session_replay_events - WHERE min_first_timestamp BETWEEN '2022-01-10 00:00:00' AND '2022-01-10 23:59:59' - GROUP BY session_id - HAVING ifNull(argMinMerge(snapshot_source), 'web') == 'mobile') - WHERE session_id NOT IN - (SELECT DISTINCT session_id - FROM session_replay_events - WHERE min_first_timestamp BETWEEN '2022-01-09 00:00:00' AND '2022-01-10 00:00:00' - GROUP BY session_id) - GROUP BY team_id + SELECT distinct_id as team, + sum(JSONExtractInt(properties, 'count')) as sum + FROM events + WHERE team_id = 2 + AND event='decide usage' + AND timestamp between '2022-01-10 00:00:00' AND '2022-01-10 23:59:59' + AND has(['correct'], replaceRegexpAll(JSONExtractRaw(properties, 'token'), '^"|"$', '')) + GROUP BY team ''' # --- # name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.8 ''' - SELECT team_id, - count(distinct session_id) as count - FROM - (SELECT any(team_id) as team_id, - session_id - FROM session_replay_events - GROUP BY session_id - HAVING ifNull(argMinMerge(snapshot_source), 'web') == 'mobile') - GROUP BY team_id + SELECT distinct_id as team, + sum(JSONExtractInt(properties, 'count')) as sum + FROM events + WHERE team_id = 2 + AND event='decide usage' + AND timestamp between '2022-01-01 00:00:00' AND '2022-01-10 23:59:59' + AND has(['correct'], replaceRegexpAll(JSONExtractRaw(properties, 'token'), '^"|"$', '')) + GROUP BY team ''' # --- # name: TestFeatureFlagsUsageReport.test_usage_report_decide_requests.9 @@ -424,7 +380,7 @@ sum(JSONExtractInt(properties, 'count')) as sum FROM events WHERE team_id = 2 - AND event='decide usage' + AND event='local evaluation usage' AND timestamp between '2022-01-10 00:00:00' AND '2022-01-10 23:59:59' AND has(['correct'], replaceRegexpAll(JSONExtractRaw(properties, 'token'), '^"|"$', '')) GROUP BY team diff --git a/posthog/tasks/test/test_usage_report.py b/posthog/tasks/test/test_usage_report.py index d7135594d225d..d977f27560b51 100644 --- a/posthog/tasks/test/test_usage_report.py +++ b/posthog/tasks/test/test_usage_report.py @@ -56,81 +56,6 @@ logger = structlog.get_logger(__name__) -def _setup_replay_data(team_id: int, include_mobile_replay: bool) -> None: - # recordings in period - 5 sessions - for i in range(1, 6): - session_id = str(i) - timestamp = now() - relativedelta(hours=12) - produce_replay_summary( - team_id=team_id, - session_id=session_id, - distinct_id=str(uuid4()), - first_timestamp=timestamp, - last_timestamp=timestamp, - ) - - if include_mobile_replay: - timestamp = now() - relativedelta(hours=12) - produce_replay_summary( - team_id=team_id, - session_id="a-single-mobile-recording", - distinct_id=str(uuid4()), - first_timestamp=timestamp, - last_timestamp=timestamp, - snapshot_source="mobile", - ) - - # recordings out of period - 11 sessions - for i in range(1, 11): - id1 = str(i + 10) - timestamp1 = now() - relativedelta(hours=48) - produce_replay_summary( - team_id=team_id, - session_id=id1, - distinct_id=str(uuid4()), - first_timestamp=timestamp1, - last_timestamp=timestamp1, - ) - # we maybe also include a single mobile recording out of period - if i == 1 and include_mobile_replay: - produce_replay_summary( - team_id=team_id, - session_id=f"{id1}-mobile", - distinct_id=str(uuid4()), - first_timestamp=timestamp1, - last_timestamp=timestamp1, - snapshot_source="mobile", - ) - - # ensure there is a recording that starts before the period and ends during the period - # report is going to be for "yesterday" relative to the test so... - start_of_day = datetime.combine(now().date(), datetime.min.time()) - relativedelta(days=1) - session_that_will_not_match = "session-that-will-not-match-because-it-starts-before-the-period" - timestamp2 = start_of_day - relativedelta(hours=1) - produce_replay_summary( - team_id=team_id, - session_id=session_that_will_not_match, - distinct_id=str(uuid4()), - first_timestamp=timestamp2, - last_timestamp=timestamp2, - ) - produce_replay_summary( - team_id=team_id, - session_id=session_that_will_not_match, - distinct_id=str(uuid4()), - first_timestamp=start_of_day, - last_timestamp=start_of_day, - ) - timestamp3 = start_of_day + relativedelta(hours=1) - produce_replay_summary( - team_id=team_id, - session_id=session_that_will_not_match, - distinct_id=str(uuid4()), - first_timestamp=timestamp3, - last_timestamp=timestamp3, - ) - - @freeze_time("2022-01-10T00:01:00Z") class UsageReport(APIBaseTest, ClickhouseTestMixin, ClickhouseDestroyTablesMixin): def setUp(self) -> None: @@ -307,8 +232,59 @@ def _create_sample_usage_data(self) -> None: team=self.org_1_team_2, ) - _setup_replay_data(team_id=self.org_1_team_2.id, include_mobile_replay=False) + # recordings in period - 5 sessions with 5 snapshots each + for i in range(1, 6): + for _ in range(0, 5): + session_id = str(i) + timestamp = now() - relativedelta(hours=12) + produce_replay_summary( + team_id=self.org_1_team_2.id, + session_id=session_id, + distinct_id=distinct_id, + first_timestamp=timestamp, + last_timestamp=timestamp, + ) + # recordings out of period - 5 sessions with 5 snapshots each + for i in range(1, 11): + for _ in range(0, 5): + id1 = str(i + 10) + timestamp1 = now() - relativedelta(hours=48) + produce_replay_summary( + team_id=self.org_1_team_2.id, + session_id=id1, + distinct_id=distinct_id, + first_timestamp=timestamp1, + last_timestamp=timestamp1, + ) + + # ensure there is a recording that starts before the period and ends during the period + # report is going to be for "yesterday" relative to the test so... + start_of_day = datetime.combine(now().date(), datetime.min.time()) - relativedelta(days=1) + session_that_will_not_match = "session-that-will-not-match-because-it-starts-before-the-period" + timestamp2 = start_of_day - relativedelta(hours=1) + produce_replay_summary( + team_id=self.org_1_team_2.id, + session_id=session_that_will_not_match, + distinct_id=distinct_id, + first_timestamp=timestamp2, + last_timestamp=timestamp2, + ) + produce_replay_summary( + team_id=self.org_1_team_2.id, + session_id=session_that_will_not_match, + distinct_id=distinct_id, + first_timestamp=start_of_day, + last_timestamp=start_of_day, + ) + timestamp3 = start_of_day + relativedelta(hours=1) + produce_replay_summary( + team_id=self.org_1_team_2.id, + session_id=session_that_will_not_match, + distinct_id=distinct_id, + first_timestamp=timestamp3, + last_timestamp=timestamp3, + ) _create_event( distinct_id=distinct_id, event="$feature_flag_called", @@ -407,8 +383,6 @@ def _test_usage_report(self) -> List[dict]: "event_count_with_groups_in_period": 2, "recording_count_in_period": 5, "recording_count_total": 16, - "mobile_recording_count_in_period": 0, - "mobile_recording_count_total": 0, "group_types_total": 2, "dashboard_count": 2, "dashboard_template_count": 0, @@ -452,8 +426,6 @@ def _test_usage_report(self) -> List[dict]: "event_count_with_groups_in_period": 2, "recording_count_in_period": 0, "recording_count_total": 0, - "mobile_recording_count_in_period": 0, - "mobile_recording_count_total": 0, "group_types_total": 2, "dashboard_count": 2, "dashboard_template_count": 0, @@ -491,8 +463,6 @@ def _test_usage_report(self) -> List[dict]: "event_count_with_groups_in_period": 0, "recording_count_in_period": 5, "recording_count_total": 16, - "mobile_recording_count_in_period": 0, - "mobile_recording_count_total": 0, "group_types_total": 0, "dashboard_count": 0, "dashboard_template_count": 0, @@ -553,8 +523,6 @@ def _test_usage_report(self) -> List[dict]: "event_count_with_groups_in_period": 0, "recording_count_in_period": 0, "recording_count_total": 0, - "mobile_recording_count_in_period": 0, - "mobile_recording_count_total": 0, "group_types_total": 0, "dashboard_count": 0, "dashboard_template_count": 0, @@ -598,8 +566,6 @@ def _test_usage_report(self) -> List[dict]: "event_count_with_groups_in_period": 0, "recording_count_in_period": 0, "recording_count_total": 0, - "mobile_recording_count_in_period": 0, - "mobile_recording_count_total": 0, "group_types_total": 0, "dashboard_count": 0, "dashboard_template_count": 0, @@ -692,41 +658,6 @@ def test_unlicensed_usage_report(self, mock_post: MagicMock, mock_client: MagicM mock_posthog.capture.assert_has_calls(calls, any_order=True) -@freeze_time("2022-01-09T00:01:00Z") -class ReplayUsageReport(APIBaseTest, ClickhouseTestMixin, ClickhouseDestroyTablesMixin): - def test_usage_report_replay(self) -> None: - _setup_replay_data(self.team.pk, include_mobile_replay=False) - - period = get_previous_day() - period_start, period_end = period - - all_reports = _get_all_usage_data_as_team_rows(period_start, period_end) - report = _get_team_report(all_reports, self.team) - - assert all_reports["teams_with_recording_count_total"] == {self.team.pk: 16} - assert report.recording_count_in_period == 5 - assert report.recording_count_total == 16 - - assert report.mobile_recording_count_in_period == 0 - assert report.mobile_recording_count_total == 0 - - def test_usage_report_replay_with_mobile(self) -> None: - _setup_replay_data(self.team.pk, include_mobile_replay=True) - - period = get_previous_day() - period_start, period_end = period - - all_reports = _get_all_usage_data_as_team_rows(period_start, period_end) - report = _get_team_report(all_reports, self.team) - - assert all_reports["teams_with_recording_count_total"] == {self.team.pk: 16} - assert report.recording_count_in_period == 5 - assert report.recording_count_total == 16 - - assert report.mobile_recording_count_in_period == 1 - assert report.mobile_recording_count_total == 2 - - class HogQLUsageReport(APIBaseTest, ClickhouseTestMixin, ClickhouseDestroyTablesMixin): def test_usage_report_hogql_queries(self) -> None: for _ in range(0, 100): diff --git a/posthog/tasks/usage_report.py b/posthog/tasks/usage_report.py index 2007037705a41..958601d1ec3ca 100644 --- a/posthog/tasks/usage_report.py +++ b/posthog/tasks/usage_report.py @@ -81,13 +81,9 @@ class UsageReportCounters: event_count_with_groups_in_period: int # event_count_by_lib: Dict # event_count_by_name: Dict - # Recordings recording_count_in_period: int recording_count_total: int - mobile_recording_count_in_period: int - mobile_recording_count_total: int - # Persons and Groups group_types_total: int # person_count_total: int @@ -504,22 +500,15 @@ def get_teams_with_event_count_by_name(begin: datetime, end: datetime) -> List[T @timed_log() @retry(tries=QUERY_RETRIES, delay=QUERY_RETRY_DELAY, backoff=QUERY_RETRY_BACKOFF) -def get_teams_with_recording_count_in_period( - begin: datetime, end: datetime, snapshot_source: Literal["mobile", "web"] = "web" -) -> List[Tuple[int, int]]: +def get_teams_with_recording_count_in_period(begin: datetime, end: datetime) -> List[Tuple[int, int]]: previous_begin = begin - (end - begin) result = sync_execute( """ SELECT team_id, count(distinct session_id) as count - FROM ( - SELECT any(team_id) as team_id, session_id - FROM session_replay_events - WHERE min_first_timestamp BETWEEN %(begin)s AND %(end)s - GROUP BY session_id - HAVING ifNull(argMinMerge(snapshot_source), 'web') == %(snapshot_source)s - ) - WHERE session_id NOT IN ( + FROM session_replay_events + WHERE min_first_timestamp BETWEEN %(begin)s AND %(end)s + AND session_id NOT IN ( -- we want to exclude sessions that might have events with timestamps -- before the period we are interested in SELECT DISTINCT session_id @@ -532,7 +521,7 @@ def get_teams_with_recording_count_in_period( ) GROUP BY team_id """, - {"previous_begin": previous_begin, "begin": begin, "end": end, "snapshot_source": snapshot_source}, + {"previous_begin": previous_begin, "begin": begin, "end": end}, workload=Workload.OFFLINE, settings=CH_BILLING_SETTINGS, ) @@ -542,19 +531,13 @@ def get_teams_with_recording_count_in_period( @timed_log() @retry(tries=QUERY_RETRIES, delay=QUERY_RETRY_DELAY, backoff=QUERY_RETRY_BACKOFF) -def get_teams_with_recording_count_total(snapshot_source: Literal["mobile", "web"]) -> List[Tuple[int, int]]: +def get_teams_with_recording_count_total() -> List[Tuple[int, int]]: result = sync_execute( """ SELECT team_id, count(distinct session_id) as count - FROM ( - SELECT any(team_id) as team_id, session_id - FROM session_replay_events - GROUP BY session_id - HAVING ifNull(argMinMerge(snapshot_source), 'web') == %(snapshot_source)s - ) + FROM session_replay_events GROUP BY team_id """, - {"snapshot_source": snapshot_source}, workload=Workload.OFFLINE, settings=CH_BILLING_SETTINGS, ) @@ -706,7 +689,6 @@ def has_non_zero_usage(report: FullUsageReport) -> bool: report.event_count_in_period > 0 or report.enhanced_persons_event_count_in_period > 0 or report.recording_count_in_period > 0 - # explicitly not including mobile_recording_count_in_period for now or report.decide_requests_count_in_period > 0 or report.local_evaluation_requests_count_in_period > 0 or report.survey_responses_count_in_period > 0 @@ -747,14 +729,8 @@ def _get_all_usage_data(period_start: datetime, period_end: datetime) -> Dict[st ), # teams_with_event_count_by_lib=get_teams_with_event_count_by_lib(period_start, period_end), # teams_with_event_count_by_name=get_teams_with_event_count_by_name(period_start, period_end), - "teams_with_recording_count_in_period": get_teams_with_recording_count_in_period( - period_start, period_end, snapshot_source="web" - ), - "teams_with_recording_count_total": get_teams_with_recording_count_total(snapshot_source="web"), - "teams_with_mobile_recording_count_in_period": get_teams_with_recording_count_in_period( - period_start, period_end, snapshot_source="mobile" - ), - "teams_with_mobile_recording_count_total": get_teams_with_recording_count_total(snapshot_source="mobile"), + "teams_with_recording_count_in_period": get_teams_with_recording_count_in_period(period_start, period_end), + "teams_with_recording_count_total": get_teams_with_recording_count_total(), "teams_with_decide_requests_count_in_period": get_teams_with_feature_flag_requests_count_in_period( period_start, period_end, FlagRequestType.DECIDE ), @@ -932,8 +908,6 @@ def _get_team_report(all_data: Dict[str, Any], team: Team) -> UsageReportCounter # event_count_by_name: Di all_data["teams_with_#"].get(team.id, 0), recording_count_in_period=all_data["teams_with_recording_count_in_period"].get(team.id, 0), recording_count_total=all_data["teams_with_recording_count_total"].get(team.id, 0), - mobile_recording_count_in_period=all_data["teams_with_mobile_recording_count_in_period"].get(team.id, 0), - mobile_recording_count_total=all_data["teams_with_mobile_recording_count_total"].get(team.id, 0), group_types_total=all_data["teams_with_group_types_total"].get(team.id, 0), decide_requests_count_in_period=decide_requests_count_in_period, decide_requests_count_in_month=decide_requests_count_in_month,