Skip to content

Commit 1c8485a

Browse files
authored
feat(Replay): Strip Dash Before EAP Replay Query (#103793)
As title says, this PR fixes a suspected "404 Not Found" bug that occurs when an EAP query is executed for a replay ID. The reason this is caused is likely because replay IDs are stored in hex without dashes in EAP, but the current query includes the dashes in the replay ID query, resulting in no data found. Relates to: https://linear.app/getsentry/issue/REPLAY-824/create-query-function-for-replay-details
1 parent 71149a7 commit 1c8485a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sentry/replays/endpoints/organization_replay_details.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ def query_replay_instance_eap(
3333
request_user_id: int | None,
3434
referrer: str = "replays.query.details_query",
3535
):
36+
# EAP stores replay_id in hex without dashes
37+
replay_ids_no_dashes = [replay_id.replace("-", "") for replay_id in replay_ids]
38+
3639
select = [
3740
Column("replay_id"),
3841
Function("min", parameters=[Column("project_id")], alias="agg_project_id"),
@@ -71,7 +74,7 @@ def query_replay_instance_eap(
7174
match=Entity("replays"),
7275
select=select,
7376
where=[
74-
Condition(Column("replay_id"), Op.IN, replay_ids),
77+
Condition(Column("replay_id"), Op.IN, replay_ids_no_dashes),
7578
],
7679
groupby=[Column("replay_id")],
7780
granularity=Granularity(3600),

0 commit comments

Comments
 (0)