mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 18:07:17 +01:00
cf4ba98a7e
Recently we read tens of millions of messages knowing the only action was to drop them. For every message we had to parse the body to get the token so we could check if we wanted to drop it. Let's put the team token into the kafka headers since if there's an incident we always care about those values. And then we can read the team token from the header and drop the message without parsing it when the team does not have session recording enabled. This still also reads the body to check for team token as a fallback. If nothing else this lets us deploy this without worrying about rolling out a switcheroo So token in headers, team not found - return early (new behaviour) token in headers, team found - does parse the body, but doesn't check the team again token not in headers, team not found - return early (as before) token not in headers, team found - (as before) |
||
---|---|---|
.. | ||
assets | ||
helpers | ||
main | ||
utils | ||
worker | ||
config.test.ts | ||
e2e.timeout.test.ts | ||
historical-export-e2e.test.ts | ||
http-server.test.ts | ||
server.test.ts | ||
sql.test.ts | ||
utils.test.ts |