You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the query contains space, it throws exception. E.g. below endpoint should work. https://hostname/actuator/metrics/jvm.memory.used?tag=area:heap,id:Eden%20Space
query is tag=area:heap,id:Eden Space, in L86, encode() will encode whitespace as %20. And in L87, impl of restTemplate.getForObject, it encodes the url again, making it %2520, causing the 404.
callstack
20:51:24.396 [pool-6-thread-3] ERROR o.s.i.v.b.j.l.v.SpringProcessLiveDataExtractorOverJMX - Error parsing beans
org.springframework.web.client.HttpClientErrorException$NotFound: 404 : [no body]
at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:113)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:168)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122)
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:819)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:777)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:334)
at org.springframework.ide.vscode.boot.java.livehover.v2.HttpActuatorConnection.getLiveMetrics(HttpActuatorConnection.java:94)
at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveDataExtractorOverHttp.getLiveMetrics(SpringProcessLiveDataExtractorOverHttp.java:388)
at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessLiveDataExtractorOverHttp.retrieveLiveMemoryMetricsData(SpringProcessLiveDataExtractorOverHttp.java:145)
at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessConnectorOverHttp.refreshMemoryMetrics(SpringProcessConnectorOverHttp.java:142)
at org.springframework.ide.vscode.boot.java.livehover.v2.SpringProcessConnectorService.lambda$4(SpringProcessConnectorService.java:240)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
I verified with latest CI build vscode-spring-boot-1.41.0-202211080047.vsix, the error is gone. (because you removed the encode() part.
But I the memory plot is not correctly rendered. I suspect maybe we need microsoft/vscode-spring-boot-dashboard#239 to get it right, as in latest CI internal build, you already include 4864c95 to fetch heap/non-heap mem data together.
@Eskibear@BoykoAlex
Yes, the #239 PR includes the necessary changes to fetch heap/non-heap metrics together to render the memory graph (with 4864c95 commit)
When the query contains space, it throws exception. E.g. below endpoint should work.
https://hostname/actuator/metrics/jvm.memory.used?tag=area:heap,id:Eden%20Space
sts4/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/livehover/v2/HttpActuatorConnection.java
Lines 86 to 87 in d70425d
query is
tag=area:heap,id:Eden Space
, in L86,encode()
will encode whitespace as%20
. And in L87, impl of restTemplate.getForObject, it encodes the url again, making it%2520
, causing the 404.callstack
BTW, the error message is misleading:
sts4/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/livehover/v2/SpringProcessLiveDataExtractorOverHttp.java
Line 399 in d70425d
The text was updated successfully, but these errors were encountered: