0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 02:49:32 +01:00
Commit Graph

8 Commits

Author SHA1 Message Date
Brett Hoerner
30bafdd382
chore(plugin-server): kafka ack cleanup and metric (#21111)
* cleanup: remove unused team arg from registerLastStep

* cleanup: rename promises to ackPromises to make it more clear thats what they are

* cleanup(plugin-server): make waitForAck explicit/required

* add Kafka produce/ack metrics

* Clarify Kafka produce metric/labels
2024-03-25 13:01:15 +00:00
Harry Waye
f901665bfa
chore: make sure dlqs exist in function tests before consuming (#16550)
In CI it's often the case that we get an error saying the
topic-partition pair doesn't exist. This creates the topic explicitly.
2023-07-13 10:49:01 +01:00
Harry Waye
39224b018e
chore: fix flaky dlq functional tests (#15439)
There is a race condition in these tests where the consumer isn't
consuming in time to pick up bad messages, so we ensure that we set the
offsets to the earliest messages.
2023-05-09 14:36:14 +01:00
Harry Waye
01da91d1e2
test: remove explicit dependencies from functional tests (#14471)
* test: remove explicit dependencies from functional tests

* Install pnpm in devcontainer
2023-03-01 12:03:54 +00:00
Harry Waye
a4a3a0c902
test(plugin-server): use librdkafka for functional tests (#14468)
* test(plugin-server): use librdkafka for functional tests

While trying to port the session recordings to use node-librdkafka I
found it useful to first implement it in the functional tests.

* use obj destructuring to make calls more self explanatory
2023-03-01 11:03:13 +00:00
Harry Waye
63ba5e2fb7
chore: remove usage of delayUntilEventsIngested (#13509)
Its usage is odd and it's not clear what it's doing.
2022-12-29 21:54:44 +00:00
Harry Waye
1e82569bbb
chore(plugin-server): Add metrics for time of last processed message (#13350)
* chore(plugin-server): Add metrics for time of last processed message

Previously we have been alerting on Kafka consumer group offset lag.
However, really we care about the delay between messages being written
to Kafka and being processed by the plugin server.

By adding the last processed timestamp, as a gauge, we can then alert on
if that time and now is greater than a threshold.

This alert would not require the plugin-server to be up to trigger, just
that there be some time registered so it handles complete failure also.

For the case that there are no messages past the committed offsets, we
will end up triggering the alert if we do not also take into
consideration the production rate into the topic.

* wip

* wip

* fix imports order

* fix group id

* Add and use waitForExpect instead

* remove yarn.lock

* move comment

* wip
2022-12-15 18:28:43 +00:00
Harry Waye
0869801a8e
chore(plugin-server): split functional tests into feature based files (#13031)
* chore(plugin-server): split functional tests into feature based files

This is intended to make it more obvious what we are testing, and to try
and identify the major themes of the plugin-server functionality.

As a by product it should make things more parallelizable for jest as
the tests in different files will be isolated, runnable in separate
workers.

* use random api token, avoid db constraints

* make tests silent

* format

* chore: set number of jest workers

These tests should be pretty light given they just hit other APIs and
don't do much themselves. Memory could be an issue on constrained
environments. We shall see.
2022-11-30 12:49:17 +00:00