-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(replay): Remove replayType
from tags and into replay_event
#6658
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
Moves `replayType` from tags to part of `replay_event`. Added in backend in getsentry/replay-backend#210
Similar to #6658 but waiting on getsentry/replay-backend#226
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.
Nice!
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.
Nice. Just had some thoughts while going through this PR but they're more food for thought than change requests :D LGTM!
replayEventPayload: expect.objectContaining({ | ||
replay_type: 'error', |
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.
Just as a side note: I'm not too happy about assertions like expect.objectContaining
because they don't catch certain kinds of changes to the object under test. In this example, when we add a field, we need to specifically look up these tests and add them to cover the new field. Also, if we "accidentally" add a field, this assertion wouldn't catch it. If we just use "hard" comparisons, I think we could increase the robustness of these tests, as they would fail automatically. It's not something we have to change right now but I think, we should keep it in mind going forward.
sdk: { integrations: ['BrowserTracing', 'Replay'], name: 'sentry.javascript.browser', version: '7.25.0' }, | ||
segment_id: 3, | ||
tags: { errorSampleRate: 0, replayType: 'error', sessionSampleRate: 1 }, | ||
tags: { errorSampleRate: 0, sessionSampleRate: 1 }, |
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.
Also side note: I think eventually, we'll want to remove these tags as well, right? IMO they don't really add value for our users and SDKs shouldn't just add additional tags to events (unless there's a justified reason to do so ofc). That being said, I know that it's convenient for us to have this data so we might want to think about a similar approach for the sample rate tags. WDYT?
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.
Yep I have a follow-up here: #6659
I think this PR broke CI on master: https://github.com/getsentry/sentry-javascript/actions/runs/3856298130/jobs/6572358551#step:6:408 |
Fixes type error from #6658 (semantic merge issue).
Fixes type error from #6658 (semantic merge issue).
Fixes type error from #6658 (semantic merge issue).
Similar to #6658 but waiting on getsentry/replay-backend#226
Similar to #6658 but waiting on getsentry/replay-backend#226
Moves
replayType
from tags to part ofreplay_event
.Added in backend in https://github.com/getsentry/replay-backend/issues/210