[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 <fwang12@ebay.com> Signed-off-by: Wang, Fei <fwang12@ebay.com>
This commit is contained in:
parent
a3b21f6f80
commit
00ff464b06
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user