0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 04:12:23 +01:00
posthog/ee/kafka_client
Harry Waye 3604c72e3a
feat(k8s): add kafka connection status to health check endpoint (#8258)
* feat(k8s): add kafka connection status to health check endpoint

This change adds a kafka check to the existing health check that uses
the underlying kafka python libs `bootstrap_connected` to check that we
are connected to kafka.

To accommodate the extra check in the response, I have updated to return
a JSON response with a lookup of `"check_name"` to it's status. We
return if any of the checks return `False`.

Something I didn't do was allow for checking each check in isolation,
e.g. we could expose for instance just the kafka_connected check at
`/_health/kafka`

* sort imports

* Remove unused requests arg, maybe useful later but not now.

* Add readyz and livez endpoint

* Add some docs

* link to k8s

* be specific about postgres

* some tests don't need postgres

* kubernetes -> process orchestration system

* update how we check kafka connection

* remove return
2022-02-03 15:15:48 +00:00
..
test Create Kafka consumer and write tests for consumer and producer (#6170) 2021-10-01 09:43:50 +01:00
__init__.py Create a write ahead log for cloud event processing (#1962) 2020-10-21 20:35:07 +02:00
client.py feat(k8s): add kafka connection status to health check endpoint (#8258) 2022-02-03 15:15:48 +00:00
helper.py Create Kafka consumer and write tests for consumer and producer (#6170) 2021-10-01 09:43:50 +01:00
topics.py Create and populate person_distinct_id2 table, add versioning to person_distinct_id (#7576) 2021-12-08 16:47:57 +02:00