-
Notifications
You must be signed in to change notification settings - Fork 210
gcPauses -> jvm.gc.pause, memory -> jvm.memory.used #875
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@@ -232,7 +236,7 @@ private void scheduleRefresh(ProgressTask progressTask, SpringProcessParams spri | |||
|
|||
try { | |||
progressTask.progressEvent(progressMessage); | |||
if(endpoint.equals("metrics") && metricName.equals("memory")) { | |||
if(METRICS.equals(endpoint) && MEMORY.equals(metricName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The metricName
passed from the API call here is ("memory", "gcPauses"). This is to identify the type of metric and not the actual metricName used for the actuator call. (Probably I should have named it metricType
. But I wanted to keep the metricQuery more generic to be used for other metric calls.
The getMemoryMetrics function is where the metric names ("jvm.memory.used, jvm.memory.max") are passed.
Also, with the current implementation, the retrieveLiveMemoryMetricsData has the logic to fetch the heap and non-heap memory metrics together.
SpringProcessGcPausesMetricsLiveData data = connectorService.getGcPausesMetricsLiveData(processKey); | ||
return CompletableFuture.completedFuture(data.getGcPausesMetrics()); | ||
} | ||
case "memory": { | ||
case SpringProcessConnectorService.MEMORY: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The metricName
passed here are ("gcPauses", "heapMemory", "nonHeapMemory"). This is used to fetch the region-specific metric data separately.
(This is the result of my bad naming convention again ;-) )
@BoykoAlex I would like to discuss and get your feedback on how to improve this.
aa9dbc4
to
c2acb0c
Compare
Closed with a411663 |
gcPauses
->jvm.gc.pause
,memory
->jvm.memory.used
. Are those metric names different for other apps?Measurements
value asDouble
rather thanLong
@vudayani-vmw please have a look at this PR and provide feedback.