SIGN IN SIGN UP

fix(replays): Scope replay summary trace-connected events to the replay's project (#125927)

Replay AI summaries looked up trace-connected errors and issue platform
events across every active project in the organization. Summaries are
generated without the viewer's access context and are shared by everyone
who can read the replay, so they now only use data from the replay's own
project.

This is bad, since if someone has access only to 1 project, if a
superuser generates the AI summary, now all viewers will see context
from all projects, if there was some. Note, it's _not_ currently
possible to generate multiple summaries based on different permission
sets, so we're choosing to simplify and only make summaries from the
actual Replay's project. REPLAY-1008 filed as a follow up to maybe
figure out other project context in the future.

The rest of the summary input (replay record, recording segments,
directly linked errors, feedback) was already read from the replay's
project and is unchanged.

Existing tests that relied on cross-project trace data now use the
replay's project, and a new test checks that errors and issue platform
events from another project on the same trace are excluded.

Closes REPLAY-998

<!-- junior-request-attribution:start -->
via **George Gritsouk**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC08V02G4Y2H%3A1790622714.725379 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC08V02G4Y2H%3A1790622714.725379)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC08V02G4Y2H%3A1790622714.725379/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: George Gritsouk <george.gritsouk@sentry.io>
S
sentry-junior[bot] committed
bf9c7e599dee314fbcbe7412c186f1c209d1a6de
Parent: 12e0e3a
Committed by GitHub <noreply@github.com> on 10/1/2026, 2:26:27 PM