0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00
posthog/plugin-server/tests
Paul D'Ambra cf4ba98a7e
feat: read team token from kafka headers in blobby (#18337)
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)
2023-11-08 14:59:18 +00:00
..
assets
helpers
main feat: read team token from kafka headers in blobby (#18337) 2023-11-08 14:59:18 +00:00
utils
worker feat(plugin-server): remove frontend transpilation (#18466) 2023-11-08 14:30:31 +00:00
config.test.ts
e2e.timeout.test.ts
historical-export-e2e.test.ts
http-server.test.ts
server.test.ts fix: Simplify plugin server tests (#18358) 2023-11-03 10:40:10 +01:00
sql.test.ts
utils.test.ts