errortracking: Add ability to use tables backed by remote storage
Related:
This commit introduces the ability for errortracking
to start using remote storage backed disks for its CH schemas. Tested and benchmarked with GCS buckets for now. A quick summary of these tests was documented here: https://gitlab.com/gitlab-org/opstrace/opstrace/-/issues/1596#note_1227268468.
While at it, the commit also brings a few other improvements/fixes as was necessary for the tests:
- Adds missing logic to perform inserts for error events V2 via
InsertErrorEventV2
. - Adds ability to configure compression on database interactions via the
clickhouse-go
client. This is currently disabled behind a switch to not enable it right away. - Adds client-side persistent buffering to queue and batch writes into CH tables, improving write throughput. This is currently behind a switch to not enable it right away.
- Moves
errortracking
instances to use aStatefulset
instead of aDeployment
in preparation of enabling client-side persistent buffering when we're ready to. - Adds a
features
map to theCluster
CR to allow controlled logical switching of features/blocks of functionality. - Adds the ability to run a
net/http
debug server alongside our deployment. - Adds a metric around monitoring payload sizes for all events received.
-
go fmt
s existing code which went amiss from previous commits.