You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If someone would forget to wrap the capture call in a useEffect (or similar situation) then they would end up tracking 1000s of events in a short period of time. We can deal with this on the backend but it would be much better if we could simply detect this in the frontend and immediately stop the ingestion, logging a warning about why this has been stopped (and potentially the stack trace) so that a dev could investigate further.
Things to consider:
There may be some cases where this is wanted (rapid events in succession) so we should have a somewhat high threshold (100 events maybe) to allow these burst situations to occur
We might want to track a special event $client_rate_limited so that this is visible in PostHog to the user otherwise they might just remain confused why they see no events coming in (also good for us to be able to track this happening and pro-actively reach out to the customer)
The text was updated successfully, but these errors were encountered:
I'm thinking of this more abstractly from React as a simple rate limiter on the underlying capture code. Went for the React example because I figured that is an actual example that is not unreasonable for even a senior engineer to accidentally do 😅
Consider the following:
If someone would forget to wrap the
capture
call in auseEffect
(or similar situation) then they would end up tracking 1000s of events in a short period of time. We can deal with this on the backend but it would be much better if we could simply detect this in the frontend and immediately stop the ingestion, logging a warning about why this has been stopped (and potentially the stack trace) so that a dev could investigate further.Things to consider:
$client_rate_limited
so that this is visible in PostHog to the user otherwise they might just remain confused why they see no events coming in (also good for us to be able to track this happening and pro-actively reach out to the customer)The text was updated successfully, but these errors were encountered: