Skip to content
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: Add rate limit info to events #1160

Merged
merged 3 commits into from
May 2, 2024
Merged

Conversation

benjackwhite
Copy link
Collaborator

@benjackwhite benjackwhite commented May 2, 2024

Changes

If the client rate limits, we send a subsequent event for ingestion warnings but that doesn't help much if you are trying to debug whats going on.

We could save the ingestion warning event but that would be added to the users event total.
or we could add some info about the current rate limit to all events so that it is possible to filter for events where the rate limit was about to kick in.

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

@benjackwhite benjackwhite added the bump patch Bump patch version when this PR gets merged label May 2, 2024
@benjackwhite benjackwhite requested review from pauldambra and xvello May 2, 2024 09:09
Copy link

vercel bot commented May 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview May 2, 2024 10:19am

Copy link

github-actions bot commented May 2, 2024

Size Change: +532 B (0%)

Total Size: 972 kB

Filename Size Change
dist/array.full.js 234 kB +133 B (0%)
dist/array.js 131 kB +133 B (0%)
dist/es.js 131 kB +133 B (0%)
dist/module.js 131 kB +133 B (0%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 12.2 kB
dist/recorder-v2.js 108 kB
dist/recorder.js 108 kB
dist/surveys-module-previews.js 57.2 kB
dist/surveys.js 58.8 kB

compressed-size-action

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

src/posthog-core.ts Outdated Show resolved Hide resolved
src/__tests__/rate-limiter.test.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants