-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(replay): Improve capture of errorIds/traceIds #8678
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
Conversation
size-limit report 📦
|
eae9ae5
to
8031e7f
Compare
We limit to max. 100 IDs being captured per replay, and ensure we do not capture stuff when replay has been disabled in the meanwhile.
8031e7f
to
3aa5c07
Compare
// In error mode, _context gets cleared on every checkout | ||
// We limit to max. 100 transactions linked | ||
if (event.contexts && event.contexts.trace && event.contexts.trace.trace_id && replayContext.traceIds.size < 100) { | ||
replayContext.traceIds.add(event.contexts.trace.trace_id as string); |
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.
This is good for now, but was thinking in general, how can we communicate the behavior to customers?
Maybe a "custom" breadcrumb? I think I want to document our recording "protocol" a bit with all the different breadcrumb types we have.
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.
IMHO the "real" solution to this is to stop using this at all and make the connection on the backend, e.g. update the errorIds server side in a job after the replay is completed or similar 🤔
We should generally only ever hit this max for buffered replays right? |
Realistically yes, I'd say! |
We limit to max. 100 IDs being captured per replay, and ensure we do not capture stuff when replay has been disabled in the meanwhile.
Since our handlers are (sadly) all global, I guess it may have been possible for something "bad" to happen when replay has been disabled in the meanwhile 🤔
ref https://github.com/getsentry/team-replay/issues/131
ref #8672