-
Notifications
You must be signed in to change notification settings - Fork 1.9k
chore(ingestion): Break out routing normalization PR for posthog (capture.py) only #31321
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
Is there a corresponding charts PR that needs to go out first? Or is this env var already set on the django pods? |
I need to check on that since the naming is changed but I assume yes on the |
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.
LGTM, do we have any dropped tokens in django capture on prod?
Also, I don't think any of the test failures are related to your changes. |
38f81ab
to
500b74b
Compare
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.
PR Summary
This PR normalizes event dropping functionality in PostHog's ingestion services by renaming environment variables and modifying token/distinct ID pair handling.
- Changed environment variable from
DROPPED_KEYS
toDROP_EVENTS_BY_TOKEN_DISTINCT_ID
in/posthog/settings/ingestion.py
for clearer intent - Modified delimiter from semicolon to comma for token:distinct_id pairs in
/posthog/api/capture.py
- Made distinct_id optional in token:distinct_id pairs for more flexible event dropping
- Reorganized Kafka topic imports in
/posthog/api/capture.py
for better code organization
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
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.
lgtm
👋 working up corresponding PR to ensure the deployed env vars are set to expect this change |
I couldn't find any reference to |
Problem
We'd like to normalize all the event drop and rerouting (overflow etc.) across ingest services so this functionality is easier to use for maintainers.
Changes
Extracted the Python-specific (Django
capture
) changes from this closed PR.🎗️ Will require a matching
charts
change to shift preexisting settings to the new var and format.Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Locally and in CI