From 2871e8b64316d21909629127291a9b7149790734 Mon Sep 17 00:00:00 2001 From: volokluev <3169433+volokluev@users.noreply.github.com> Date: Fri, 2 Jun 2023 08:21:44 -0700 Subject: [PATCH] chore(capman): Pass organization id to replay queries (#50180) Organization id is necessary for snuba allocation policy, changing the logic to pass it in. --- src/sentry/replays/endpoints/project_replay_clicks_index.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sentry/replays/endpoints/project_replay_clicks_index.py b/src/sentry/replays/endpoints/project_replay_clicks_index.py index 9dd1cd78d057d..187bbe3933a85 100644 --- a/src/sentry/replays/endpoints/project_replay_clicks_index.py +++ b/src/sentry/replays/endpoints/project_replay_clicks_index.py @@ -74,6 +74,7 @@ def data_fn(offset, limit): limit=limit, offset=offset, search_filters=search_filters, + organization_id=project.organization.id, ) return self.paginate( @@ -91,6 +92,7 @@ def query_replay_clicks( limit: int, offset: int, search_filters: SearchFilter, + organization_id: int, ): """Query replay clicks. @@ -152,6 +154,7 @@ def query_replay_clicks( offset=Offset(offset), granularity=Granularity(3600), ), + tenant_ids={"organization_id": organization_id, "referrer": "replay-backend-web"}, ) return raw_snql_query(snuba_request, REFERRER)