-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,10 +23,10 @@ describe('createReplayEnvelope', () => { | |
| name: 'sentry.javascript.browser', | ||
| version: '7.25.0', | ||
| }, | ||
| replay_type: 'error', | ||
| tags: { | ||
| sessionSampleRate: 1, | ||
| errorSampleRate: 0, | ||
| replayType: 'error', | ||
| }, | ||
| }; | ||
|
|
||
|
|
@@ -59,9 +59,10 @@ describe('createReplayEnvelope', () => { | |
| event_id: REPLAY_ID, | ||
| platform: 'javascript', | ||
| replay_id: REPLAY_ID, | ||
| replay_type: 'error', | ||
| 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 }, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep I have a follow-up here: #6659 |
||
| timestamp: 1670837008.634, | ||
| trace_ids: ['traceId'], | ||
| type: 'replay_event', | ||
|
|
@@ -94,7 +95,8 @@ describe('createReplayEnvelope', () => { | |
| replay_id: REPLAY_ID, | ||
| sdk: { integrations: ['BrowserTracing', 'Replay'], name: 'sentry.javascript.browser', version: '7.25.0' }, | ||
| segment_id: 3, | ||
| tags: { errorSampleRate: 0, replayType: 'error', sessionSampleRate: 1 }, | ||
| replay_type: 'error', | ||
| tags: { errorSampleRate: 0, sessionSampleRate: 1 }, | ||
| timestamp: 1670837008.634, | ||
| trace_ids: ['traceId'], | ||
| type: 'replay_event', | ||
|
|
||
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.objectContainingbecause 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.