You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by fe...@apache.org on 2025/06/12 05:32:52 UTC
(kyuubi) branch master updated: [KYUUBI #7094] Add serverOnly flag for metrics config items
This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 00ff464b06 [KYUUBI #7094] Add serverOnly flag for metrics config items
00ff464b06 is described below
commit 00ff464b065aaf193f6b10886125212102385437
Author: Wang, Fei <fw...@ebay.com>
AuthorDate: Wed Jun 11 22:32:46 2025 -0700
[KYUUBI #7094] Add serverOnly flag for metrics config items
### Why are the changes needed?
MetricsSystem is only used for KyuubiServer, all the metrics config items are server only.
### How was this patch tested?
GA.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #7094 from turboFei/serverOnly.
Closes #7094
8324419dd [Wang, Fei] Add server only flag for metrics conf
Authored-by: Wang, Fei <fw...@ebay.com>
Signed-off-by: Wang, Fei <fw...@ebay.com>
---
.../src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala b/kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala
index 887f6e7213..22254a49c3 100644
--- a/kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala
+++ b/kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala
@@ -27,12 +27,14 @@ object MetricsConf {
val METRICS_ENABLED: ConfigEntry[Boolean] =
buildConf("kyuubi.metrics.enabled")
+ .serverOnly
.doc("Set to true to enable kyuubi metrics system")
.version("1.2.0")
.booleanConf
.createWithDefault(true)
val METRICS_REPORTERS: ConfigEntry[Set[String]] = buildConf("kyuubi.metrics.reporters")
+ .serverOnly
.doc("A comma-separated list for all metrics reporters" +
"<ul>" +
" <li>CONSOLE - ConsoleReporter which outputs measurements to CONSOLE periodically.</li>" +
@@ -49,24 +51,28 @@ object MetricsConf {
.createWithDefault(Set(PROMETHEUS.toString))
val METRICS_CONSOLE_INTERVAL: ConfigEntry[Long] = buildConf("kyuubi.metrics.console.interval")
+ .serverOnly
.doc("How often should report metrics to console")
.version("1.2.0")
.timeConf
.createWithDefault(Duration.ofSeconds(5).toMillis)
val METRICS_JSON_LOCATION: ConfigEntry[String] = buildConf("kyuubi.metrics.json.location")
+ .serverOnly
.doc("Where the JSON metrics file located")
.version("1.2.0")
.stringConf
.createWithDefault("metrics")
val METRICS_JSON_INTERVAL: ConfigEntry[Long] = buildConf("kyuubi.metrics.json.interval")
+ .serverOnly
.doc("How often should report metrics to JSON file")
.version("1.2.0")
.timeConf
.createWithDefault(Duration.ofSeconds(5).toMillis)
val METRICS_PROMETHEUS_PORT: ConfigEntry[Int] = buildConf("kyuubi.metrics.prometheus.port")
+ .serverOnly
.doc("Prometheus metrics HTTP server port")
.version("1.2.0")
.intConf
@@ -74,6 +80,7 @@ object MetricsConf {
.createWithDefault(10019)
val METRICS_PROMETHEUS_PATH: ConfigEntry[String] = buildConf("kyuubi.metrics.prometheus.path")
+ .serverOnly
.doc("URI context path of prometheus metrics HTTP server")
.version("1.2.0")
.stringConf
@@ -82,12 +89,14 @@ object MetricsConf {
val METRICS_PROMETHEUS_LABELS_INSTANCE_ENABLED: ConfigEntry[Boolean] =
buildConf("kyuubi.metrics.prometheus.labels.instance.enabled")
+ .serverOnly
.doc("Whether to add instance label to prometheus metrics")
.version("1.10.2")
.booleanConf
.createWithDefault(false)
val METRICS_SLF4J_INTERVAL: ConfigEntry[Long] = buildConf("kyuubi.metrics.slf4j.interval")
+ .serverOnly
.doc("How often should report metrics to SLF4J logger")
.version("1.2.0")
.timeConf