From fc9bd2de03fb12f873e01313691d69f1a4eae9c4 Mon Sep 17 00:00:00 2001 From: Amnon Heiman Date: Tue, 23 Jan 2024 12:53:31 +0200 Subject: [PATCH] config: Add prometheus_allow_protobuf flag Native histograms (also known as sparse histograms) are an experimental Prometheus feature. They use protobuf as the reporting layer. The prometheus_allow_protobuf flag allows the user to enable protobuf protocol. When this flag is set to true, and the Prometheus server sends in the request that it accepts protobuf, the result will be in protobuf protocol. Signed-off-by: Amnon Heiman --- db/config.cc | 1 + db/config.hh | 1 + 2 files changed, 2 insertions(+) diff --git a/db/config.cc b/db/config.cc index 8f205bdf72..0b5c05b42d 100644 --- a/db/config.cc +++ b/db/config.cc @@ -970,6 +970,7 @@ db::config::config(std::shared_ptr exts) , prometheus_port(this, "prometheus_port", value_status::Used, 9180, "Prometheus port, set to zero to disable.") , prometheus_address(this, "prometheus_address", value_status::Used, {/* listen_address */}, "Prometheus listening address, defaulting to listen_address if not explicitly set.") , prometheus_prefix(this, "prometheus_prefix", value_status::Used, "scylla", "Set the prefix of the exported Prometheus metrics. Changing this will break Scylla's dashboard compatibility, do not change unless you know what you are doing.") + , prometheus_allow_protobuf(this, "prometheus_allow_protobuf", value_status::Used, false, "If set allows the experimental Prometheus protobuf with native histogram") , abort_on_lsa_bad_alloc(this, "abort_on_lsa_bad_alloc", value_status::Used, false, "Abort when allocation in LSA region fails.") , murmur3_partitioner_ignore_msb_bits(this, "murmur3_partitioner_ignore_msb_bits", value_status::Used, default_murmur3_partitioner_ignore_msb_bits, "Number of most significant token bits to ignore in murmur3 partitioner; increase for very large clusters.") , unspooled_dirty_soft_limit(this, "unspooled_dirty_soft_limit", value_status::Used, 0.6, "Soft limit of unspooled dirty memory expressed as a portion of the hard limit.") diff --git a/db/config.hh b/db/config.hh index 7a6ab6486f..0aba325385 100644 --- a/db/config.hh +++ b/db/config.hh @@ -351,6 +351,7 @@ public: named_value prometheus_port; named_value prometheus_address; named_value prometheus_prefix; + named_value prometheus_allow_protobuf; named_value abort_on_lsa_bad_alloc; named_value murmur3_partitioner_ignore_msb_bits; named_value unspooled_dirty_soft_limit;