Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ def query_replay_instance_eap(
request_user_id: int | None,
referrer: str = "replays.query.details_query",
):
# EAP stores replay_id in hex without dashes
replay_ids_no_dashes = [replay_id.replace("-", "") for replay_id in replay_ids]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: EAP query returns incomplete data

The EAP query selects only a subset of fields compared to the non-EAP query path, which returns all fields from QUERY_ALIAS_COLUMN_MAP when fields=[]. Critical missing fields include trace_ids, error_ids, warning_ids, info_ids, user fields, environment, tags, urls, releases, replay_type, platform, dist, duration, activity, sdk, os, browser, device, ota_updates, click fields, and viewed_by_ids. This causes the EAP endpoint to return incomplete replay details compared to the standard query path.

Fix in Cursor Fix in Web

select = [
Column("replay_id"),
Function("min", parameters=[Column("project_id")], alias="agg_project_id"),
Expand Down Expand Up @@ -71,7 +74,7 @@ def query_replay_instance_eap(
match=Entity("replays"),
select=select,
where=[
Condition(Column("replay_id"), Op.IN, replay_ids),
Condition(Column("replay_id"), Op.IN, replay_ids_no_dashes),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing WHERE conditions in EAP query

The EAP query is missing critical WHERE conditions for project_id and timestamp that filter results to the specified projects and time range. The function receives project_ids, start, and end parameters but doesn't use them in the query, potentially returning replays from any project and any time period instead of the requested scope. Additionally, the query lacks a HAVING clause to ensure segment_id = 0 exists, which validates replay completeness.

Fix in Cursor Fix in Web

],
groupby=[Column("replay_id")],
granularity=Granularity(3600),
Expand Down
Loading