Commit Graph

4 Commits

Author SHA1 Message Date
Vincent Bernat
fa11e7de6d common/reporter: simplify interface for collecting metrics
Remove unused methods and always collect scoped metrics. As a
side-effect, BioRIS gRPC metrics are now correctly scoped.
2025-08-27 07:37:38 +02:00
Vincent Bernat
ea97eb1b9b outlet/kafka: fix spelling in a log message 2025-08-16 21:36:03 +02:00
Vincent Bernat
b71ed907e8 outlet/kafka: collect metrics have creating new client
We cannot do that before, otherwise, we run into a race condition as the
list of metrics is not protected inside kprom franz-go plugin.

Also do that for inlet/kafka, even if it is less important there, since
there is only one client.
2025-08-09 15:58:25 +02:00
Vincent Bernat
e5a625aecf outlet: make the number of Kafka workers dynamic
Inserting into ClickHouse should be done in large batches to minimize
the number of parts created. This would require the user to tune the
number of Kafka workers to match a target of around 50k-100k rows. Instead,
we dynamically tune the number of workers depending on the load to reach
this target.

We keep using async if we are too low in number of flows.

It is still possible to do better by consolidating batches from various
workers, but that's something I wanted to avoid.

Also, increase the maximum wait time to 5 seconds. It should be good
enough for most people.

Fix #1885
2025-08-09 15:58:25 +02:00