main.cc: Add prometheus_allow_protobuf command line

This patch add the prometheus_allow_protobuf command line support.

When set to true, Prometheus will accept protobuf requests and will
reply with protobuf protocol.
This will also enable the experimental Prometheus Native Histograms.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This commit is contained in:
Amnon Heiman
2024-01-11 13:38:20 +02:00
parent 95d1146fea
commit 50b3078916

View File

@@ -863,6 +863,7 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
prometheus::config pctx;
pctx.metric_help = "Scylla server statistics";
pctx.prefix = cfg->prometheus_prefix();
pctx.allow_protobuf = cfg->prometheus_allow_protobuf();
prometheus::start(prometheus_server, pctx).get();
with_scheduling_group(maintenance_scheduling_group, [&] {
return prometheus_server.listen(socket_address{ip, cfg->prometheus_port()}).handle_exception([&ip, &cfg] (auto ep) {