-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(replay): Use correct replay category in client reports #6889
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
// Replay type event | ||
| '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.
This was just a duplicated entry
@@ -337,13 +338,15 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> { | |||
// Note: we use `event` in replay, where we overwrite this hook. | |||
|
|||
if (this._options.sendClientReports) { | |||
// We want to track each category (error, transaction, session, replay_event) separately | |||
const clientReportCategory = dataCategoryToClientReportCategory(category); |
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.
Arguably, it'd be cleaner to change the method's signature type to ClientReportCategory but this is breaking. Also, we'd need to call the conversion function more often which increases bundle size
size-limit report 📦
|
Actually, I think there is a better/easier fix for this:
I think that should work...? |
Made a draft to show what I mean, I am honestly not 100% sure if I am missing something here, but I think that should have the outcome we want: #6891 ?? WDYT? |
Closing in favour of #6891 |
After adjusting the _admin UI to display outcomes of replay events (https://github.com/getsentry/getsentry/pull/9301), we noticed that only server-side outcomes are shown. After some investigation, I found out that the client reports our SDKs send to Sentry contain the wrong category for replay events:
Instead of
replay_event
(orreplay_recording
) the valid category for client reports should simply bereplay
.To fix this, this PR first adds a conversion function to the
recordDroppedEvent
function (which collects the client outcomes) and secondly, it adds two newDataCategory
types for rate limits and client reports. This is necessary because replay event types and rate-limit/client-report categories aren't identical anymore. While it'd arguably be better that they are in fact identical, I think this is the quickest fix and the types should help us distinguishing the applicable categories going forward.ref #6502