PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
19.35k stars 1.13k forks source link

fix: Added heartbeats within each function call #23317

Closed benjackwhite closed 4 days ago

benjackwhite commented 4 days ago

Problem

The overflow consumer only gets bad events, which of course means it might process a full batch of events that all timeout.

As such the thread can be completely clogged for a decent amount of timing, missing a kafka heartbeat.

Changes

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?