Skip to content

Conversation

@aliu39
Copy link
Member

@aliu39 aliu39 commented Sep 15, 2025

Currently segment downloads and log parsing are done synchronously, before queueing a summary task in Seer. This PR moves that work to a RPC call which will be called by the task, allowing project_replay_summary endpoint to be fully async/return immediately.

Changes in both services can be rolled out together with a new FF.

Part of REPLAY-708: Move POST endpoint log parsing to Seer->Sentry RPC

@aliu39 aliu39 requested review from a team as code owners September 15, 2025 22:18
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 15, 2025
@linear
Copy link

linear bot commented Sep 15, 2025

SEER_START_TASK_ENDPOINT_PATH,
{
"logs": [],
"use_rpc": True,
Copy link
Member Author

Choose a reason for hiding this comment

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

Used to toggle code paths in seer (default false)

@codecov
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

❌ Patch coverage is 82.35294% with 6 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...sentry/replays/endpoints/project_replay_summary.py 28.57% 5 Missing ⚠️
src/sentry/replays/usecases/summarize.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #99547   +/-   ##
=======================================
  Coverage   81.20%   81.20%           
=======================================
  Files        8563     8563           
  Lines      380233   380265   +32     
  Branches    23953    23953           
=======================================
+ Hits       308773   308804   +31     
- Misses      71109    71110    +1     
  Partials      351      351           

if features.has(
"organizations:replay-ai-summaries-rpc", project.organization, actor=request.user
):
start, end = default_start_end_dates()
Copy link
Member Author

Choose a reason for hiding this comment

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

deciding to not support date params, imo it's not necessary. We don't pass these in from the frontend atm

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

"organizations:replay-ai-summaries-rpc", project.organization, actor=request.user
):
start, end = default_start_end_dates()
snuba_response = query_replay_instance(
Copy link
Member

Choose a reason for hiding this comment

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

isn't the query_replace_instance call in the other (summarize.py) file already?

Copy link
Member

Choose a reason for hiding this comment

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

i guess i'm confused why we have this call + also the other one

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to 404 early if the replay's missing, instead of making a seer task + db entry

Copy link
Member Author

Choose a reason for hiding this comment

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

Colton is working on a more efficient existence check but hope this will do til then. Can test with the FF

Copy link
Member

Choose a reason for hiding this comment

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

ohhh ok makes sense

@aliu39 aliu39 merged commit 47931d5 into master Sep 22, 2025
64 checks passed
@aliu39 aliu39 deleted the aliu/replay-rpc branch September 22, 2025 16:50
@sentry
Copy link

sentry bot commented Sep 22, 2025

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants