rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

add custom event into the counting of checkout

Open Yuyz0112 opened this issue 3 years ago • 2 comments

related to #958, #763

I've marked this PR as a draft because I think there are several things we can discuss.

The benefit of counting all events into the checkout calculating

This let the behavior of checkout become more transparent and can use things like custom event and plugin to do fancy features.

But there is also a sub-question of whether we should count all the meta, load, custom, plugin events, or just part of it. For example, the current PR only count custom event because I think the custom events can be controlled by the recorder user.

The downside of this change

  1. It will break some current behavior.
  2. If there is a plugin that can produce a lot of events, it may mass up things.

But we are on the schedule for v2.0, so I think it's good timing if we want to do some changes.

Yuyz0112 avatar Aug 17 '22 15:08 Yuyz0112

IMO, I'd prefer to include all events because it's more consistent with the meaning checkoutEveryNth. I haven't used this config before so I can't provide suggestions from a user's perspective. BTW, is it possible for us to implement checkoutEveryNms with setInverval?

YunFeng0817 avatar Aug 18 '22 04:08 YunFeng0817

I also haven't used this in production so I don't have a proper opinion on the matter, but doing it as part of the 2.0 release makes sense to me

Juice10 avatar Aug 18 '22 08:08 Juice10