-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(replay): move summary log parsing to a seer rpc #99547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
SEER_START_TASK_ENDPOINT_PATH, | ||
{ | ||
"logs": [], | ||
"use_rpc": True, |
There was a problem hiding this comment.
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 Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (29.41%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #99547 +/- ##
==========================================
+ Coverage 81.04% 81.23% +0.19%
==========================================
Files 8589 8590 +1
Lines 380373 380402 +29
Branches 24128 24128
==========================================
+ Hits 308260 309021 +761
+ Misses 71750 71018 -732
Partials 363 363 |
if features.has( | ||
"organizations:replay-ai-summaries-rpc", project.organization, actor=request.user | ||
): | ||
start, end = default_start_end_dates() |
There was a problem hiding this comment.
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
|
||
# 404s are handled in the originating Sentry /summarize/ endpoint. | ||
if not processed_response: | ||
return [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Empty Response Causes Type Mismatch
The rpc_get_replay_summary_logs
function returns an empty list when processed_response
is empty. This is inconsistent with its dict[str, Any]
type annotation and its normal dictionary return, which could cause runtime errors for callers expecting a 'logs' key.
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
test coverage todo