Skip to content

Commit 3108c8e

Browse files
Kyofinpan3793
andcommitted
[KYUUBI #4796] Expose JVM attributes to metrics
### _Why are the changes needed?_ related issue : #2526 i just make the grafana dashboard of kyuubi , but i can not get the metrics of kyuubi server start time. ![图片](https://user-images.githubusercontent.com/18548053/236595754-b839e608-a087-43e6-8c31-9b6639e94138.png) we can add JvmAttributeGaugeSet to get the uptime metrics of kyuubi . ![图片](https://user-images.githubusercontent.com/18548053/236595818-d0b6958d-f660-403f-8f72-a1ef6f679383.png) ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4796 from Kyofin/master. Closes #4796 ba1de91 [Cheng Pan] Update kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsSystem.scala e2f15a6 [Cheng Pan] Update kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConstants.scala 6655520 [huzk] add jvm metrics Lead-authored-by: huzk <[email protected]> Co-authored-by: Cheng Pan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
1 parent d7417ce commit 3108c8e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConstants.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ object MetricsConstants {
2626
final val BUFFER_POOL: String = KYUUBI + "buffer_pool"
2727
final val THREAD_STATE: String = KYUUBI + "thread_state"
2828
final val CLASS_LOADING: String = KYUUBI + "class_loading"
29+
final val JVM: String = KYUUBI + "jvm"
2930

3031
final val EXEC_POOL_ALIVE: String = KYUUBI + "exec.pool.threads.alive"
3132
final val EXEC_POOL_ACTIVE: String = KYUUBI + "exec.pool.threads.active"

kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsSystem.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class MetricsSystem extends CompositeService("MetricsSystem") {
6767
}
6868

6969
override def initialize(conf: KyuubiConf): Unit = synchronized {
70+
registry.registerAll(MetricsConstants.JVM, new JvmAttributeGaugeSet)
7071
registry.registerAll(MetricsConstants.GC_METRIC, new GarbageCollectorMetricSet)
7172
registry.registerAll(MetricsConstants.MEMORY_USAGE, new MemoryUsageGaugeSet)
7273
registry.registerAll(

0 commit comments

Comments
 (0)