-
Notifications
You must be signed in to change notification settings - Fork 134
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
feat: Added client side capture rate limiting #1051
Conversation
Size Change: +5.58 kB (+1%) Total Size: 968 kB
ℹ️ View Unchanged
|
is it missing a commit? ratelimiter has no "bucket" |
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.
ran it locally
captured 100k events in a loop
only ingested 291
saw logs in the console
🚀
only "improvement" I can think of is a heavily debounced internal event or custom rrweb event in recording maybe that we throttled to help with support but that's very much polishing and not blocking
# Conflicts: # src/posthog-core.ts # src/posthog-featureflags.ts
# Conflicts: # src/__tests__/decide.js # src/__tests__/featureflags.js # src/__tests__/posthog-core.identify.js # src/__tests__/rate-limiter.test.ts # src/decide.ts # src/posthog-core.ts # src/posthog-featureflags.ts # src/rate-limiter.ts # src/types.ts
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This is a bit stuck in limbo atm due to the inability to filter out these internal events from usage reports... Wondering about changing the logic instead on pipeline filter out the event (maybe make it a specific one called @xvello ideally I'd leave this more to pipeline to decide on the best approach / point in time to do that filtering. Either I can keep this PR on hold until something like that is ready, or merge without the rate limit event. Thoughts? |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
# Conflicts: # src/constants.ts # src/posthog-core.ts # src/posthog-persistence.ts # src/types.ts
# Conflicts: # src/__tests__/posthog-core.js # src/posthog-core.ts # src/types.ts
# Conflicts: # src/posthog-core.ts
Changes
Needs PostHog/posthog#21388
We want to protect ourselves and our users from abnormal client behaviour. This can be anything from an accidental loop in the code to someone running some strange scripts in the browser to a bug.
Checklist